When checking for sret-demotion, it needs to use legal types. When using the return...
[oota-llvm.git] / test / CodeGen / X86 / 2006-11-27-SelectLegalize.ll
index 368cc34936e00fb1ef60114148ff83b5acfdbcfc..ea2e6db61e1afeea2091117172cc6ba78c63172f 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: llvm-as < %s | llc -march=x86 | grep test.*1
+; RUN: llc < %s -march=x86 | grep test.*1
 ; PR1016
 
-int %test(int %A, int %B, int %C) {
-       %a = trunc int %A to bool
-       %D = select bool %a, int %B, int %C
-       ret int %D
+define i32 @test(i32 %A, i32 %B, i32 %C) {
+        %a = trunc i32 %A to i1         ; <i1> [#uses=1]
+        %D = select i1 %a, i32 %B, i32 %C               ; <i32> [#uses=1]
+        ret i32 %D
 }
+