summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/avx512-cmp.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/avx512-cmp.ll')
-rw-r--r--test/CodeGen/X86/avx512-cmp.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx512-cmp.ll b/test/CodeGen/X86/avx512-cmp.ll
index 93aa8b0908..f2e7608c91 100644
--- a/test/CodeGen/X86/avx512-cmp.ll
+++ b/test/CodeGen/X86/avx512-cmp.ll
@@ -56,4 +56,21 @@ define i16 @test4(i16 %a, i16 %b) {
%b1 = add i16 %a, %b
ret i16 %b1
+}
+
+; CHECK-LABEL: test5
+; CHECK: ret
+define float @test5(float %p) #0 {
+entry:
+ %cmp = fcmp oeq float %p, 0.000000e+00
+ br i1 %cmp, label %return, label %if.end
+
+if.end: ; preds = %entry
+ %cmp1 = fcmp ogt float %p, 0.000000e+00
+ %cond = select i1 %cmp1, float 1.000000e+00, float -1.000000e+00
+ br label %return
+
+return: ; preds = %if.end, %entry
+ %retval.0 = phi float [ %cond, %if.end ], [ %p, %entry ]
+ ret float %retval.0
} \ No newline at end of file