aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/isel-sink2.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/isel-sink2.ll')
-rw-r--r--test/CodeGen/X86/isel-sink2.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/isel-sink2.ll b/test/CodeGen/X86/isel-sink2.ll
new file mode 100644
index 0000000..d8e27e9
--- /dev/null
+++ b/test/CodeGen/X86/isel-sink2.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep {movzbl.7(%...)}
+; RUN: llvm-as < %s | llc -march=x86 | not grep leal
+
+define i8 @test(i32 *%P) nounwind {
+ %Q = getelementptr i32* %P, i32 1
+ %R = bitcast i32* %Q to i8*
+ %S = load i8* %R
+ %T = icmp eq i8 %S, 0
+ br i1 %T, label %TB, label %F
+TB:
+ ret i8 4
+F:
+ %U = getelementptr i8* %R, i32 3
+ %V = load i8* %U
+ ret i8 %V
+}