[llvm-commits] [llvm] r164842 - /llvm/trunk/test/CodeGen/X86/jump_sign.ll
Manman Ren
mren at apple.com
Fri Sep 28 13:26:33 PDT 2012
Author: mren
Date: Fri Sep 28 15:26:33 2012
New Revision: 164842
URL: http://llvm.org/viewvc/llvm-project?rev=164842&view=rev
Log:
Testcase for r164835
Modified:
llvm/trunk/test/CodeGen/X86/jump_sign.ll
Modified: llvm/trunk/test/CodeGen/X86/jump_sign.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/jump_sign.ll?rev=164842&r1=164841&r2=164842&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/jump_sign.ll (original)
+++ llvm/trunk/test/CodeGen/X86/jump_sign.ll Fri Sep 28 15:26:33 2012
@@ -278,3 +278,31 @@
%cond = select i1 %cmp, i32 %add, i32 0
ret i32 %cond
}
+
+; PR13966
+ at b = common global i32 0, align 4
+ at a = common global i32 0, align 4
+define i32 @test1(i32 %p1) nounwind uwtable {
+entry:
+; CHECK: test1:
+; CHECK: testb
+; CHECK: j
+; CHECK: ret
+ %0 = load i32* @b, align 4
+ %cmp = icmp ult i32 %0, %p1
+ %conv = zext i1 %cmp to i32
+ %1 = load i32* @a, align 4
+ %and = and i32 %conv, %1
+ %conv1 = trunc i32 %and to i8
+ %2 = urem i8 %conv1, 3
+ %tobool = icmp eq i8 %2, 0
+ br i1 %tobool, label %if.end, label %if.then
+
+if.then:
+ %dec = add nsw i32 %1, -1
+ store i32 %dec, i32* @a, align 4
+ br label %if.end
+
+if.end:
+ ret i32 undef
+}
More information about the llvm-commits
mailing list