summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Thumb/i8-phi-ext.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Thumb/i8-phi-ext.ll')
-rw-r--r--llvm/test/CodeGen/Thumb/i8-phi-ext.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Thumb/i8-phi-ext.ll b/llvm/test/CodeGen/Thumb/i8-phi-ext.ll
new file mode 100644
index 00000000000..598f4f3eee1
--- /dev/null
+++ b/llvm/test/CodeGen/Thumb/i8-phi-ext.ll
@@ -0,0 +1,21 @@
+; 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
+}
OpenPOWER on IntegriCloud