X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FX86%2Fsext-i1.ll;h=1a575db11b836aa28df2a3fe1392f91a9656098b;hb=faf046c6c0a561e966f4ac671392c4b8e15c35a2;hp=574769b4308459f8cf7ba79f89921bfdfa8acf7f;hpb=592ca3fda918c2066d9d78ed360e5fd69066fda7;p=oota-llvm.git diff --git a/test/CodeGen/X86/sext-i1.ll b/test/CodeGen/X86/sext-i1.ll index 574769b4308..1a575db11b8 100644 --- a/test/CodeGen/X86/sext-i1.ll +++ b/test/CodeGen/X86/sext-i1.ll @@ -5,11 +5,11 @@ define i32 @t1(i32 %x) nounwind readnone ssp { entry: -; 32: t1: +; 32-LABEL: t1: ; 32: cmpl $1 ; 32: sbbl -; 64: t1: +; 64-LABEL: t1: ; 64: cmpl $1 ; 64: sbbl %0 = icmp eq i32 %x, 0 @@ -19,11 +19,11 @@ entry: define i32 @t2(i32 %x) nounwind readnone ssp { entry: -; 32: t2: +; 32-LABEL: t2: ; 32: cmpl $1 ; 32: sbbl -; 64: t2: +; 64-LABEL: t2: ; 64: cmpl $1 ; 64: sbbl %0 = icmp eq i32 %x, 0 @@ -36,13 +36,13 @@ entry: define i32 @t3() nounwind readonly { entry: -; 32: t3: +; 32-LABEL: t3: ; 32: cmpl $1 ; 32: sbbl ; 32: cmpl ; 32: xorl -; 64: t3: +; 64-LABEL: t3: ; 64: cmpl $1 ; 64: sbbq ; 64: cmpq @@ -61,3 +61,36 @@ if.end: ; preds = %if.then, %entry %xor27 = xor i32 undef, %cond ; [#uses=0] ret i32 0 } + +define i32 @t4(i64 %x) nounwind readnone ssp { +entry: +; 32-LABEL: t4: +; 32: movl +; 32: orl +; 32: movl +; 32: je +; 32: xorl + +; 64-LABEL: t4: +; 64: cmpq $1 +; 64: sbbl + %0 = icmp eq i64 %x, 0 + %1 = sext i1 %0 to i32 + ret i32 %1 +} + +define i64 @t5(i32 %x) nounwind readnone ssp { +entry: +; 32-LABEL: t5: +; 32: cmpl $1 +; 32: sbbl +; 32: movl + +; 64-LABEL: t5: +; 64: cmpl $1 +; 64: sbbq + %0 = icmp eq i32 %x, 0 + %1 = sext i1 %0 to i64 + ret i64 %1 +} +