summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/win32-bool.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/win32-bool.ll')
-rw-r--r--llvm/test/CodeGen/X86/win32-bool.ll33
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/win32-bool.ll b/llvm/test/CodeGen/X86/win32-bool.ll
new file mode 100644
index 00000000000..53607ea06c7
--- /dev/null
+++ b/llvm/test/CodeGen/X86/win32-bool.ll
@@ -0,0 +1,33 @@
+; RUN: llc < %s -mtriple=i686-windows-msvc | FileCheck %s
+; RUN: llc < %s -mtriple=i686-windows-gnu | FileCheck %s
+
+define x86_fastcallcc i32 @pass_fast_bool(i1 inreg zeroext %b) {
+entry:
+ %cond = select i1 %b, i32 66, i32 0
+ ret i32 %cond
+}
+
+; CHECK-LABEL: @pass_fast_bool@4:
+; CHECK-DAG: testb %cl, %cl
+; CHECK-DAG: movl $66,
+; CHECK: retl
+
+define x86_vectorcallcc i32 @pass_vector_bool(i1 inreg zeroext %b) {
+entry:
+ %cond = select i1 %b, i32 66, i32 0
+ ret i32 %cond
+}
+
+; CHECK-LABEL: pass_vector_bool@@4:
+; CHECK-DAG: testb %cl, %cl
+; CHECK-DAG: movl $66,
+; CHECK: retl
+
+define zeroext i1 @ret_true() {
+entry:
+ ret i1 true
+}
+
+; CHECK-LABEL: ret_true:
+; CHECK: movb $1, %al
+; CHECK: retl
OpenPOWER on IntegriCloud