1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/CodeGen/Thumb/i8-phi-ext.ll
Eli Friedman a5ace10b01 [CodeGen] Emit more precise AssertZext/AssertSext nodes.
This is marginally helpful for removing redundant extensions, and the
code is easier to read, so it seems like an all-around win. In the new
test i8-phi-ext.ll, we used to emit an AssertSext i8; now we emit an
AssertZext i2, which allows the extension of the return value to be
eliminated.

Differential Revision: https://reviews.llvm.org/D49004

llvm-svn: 336868
2018-07-11 23:26:35 +00:00

22 lines
658 B
LLVM

; RUN: llc < %s | FileCheck %s
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv6m---eabi"
; CHECK-LABEL: test_fn
; CHECK-NOT: uxtb
define dso_local zeroext i8 @test_fn(i32 %x, void (...)* nocapture %f) {
entry:
%tobool = icmp eq i32 %x, 0
br i1 %tobool, label %if.end, label %if.then
if.then: ; preds = %entry
%callee.knr.cast = bitcast void (...)* %f to void ()*
tail call void %callee.knr.cast() #1
br label %if.end
if.end: ; preds = %entry, %if.then
%z.0 = phi i8 [ 3, %if.then ], [ 0, %entry ]
ret i8 %z.0
}