diff --git a/llvm/test/Regression/CodeGen/X86/compare_folding.llx b/llvm/test/Regression/CodeGen/X86/compare_folding.llx new file mode 100644 index 000000000000..3d8e6c75fcae --- /dev/null +++ b/llvm/test/Regression/CodeGen/X86/compare_folding.llx @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep com | wc -l > %t2 +; RUN: grep 'COM =' %s | grep -v grep | wc -l > %t1 +; RUN: diff %t1 %t2 +declare bool %llvm.isnan(double) + +bool %test1(double %X, double %Y) { ;; Returns isunordered(X,Y) + %a = call bool %llvm.isnan(double %X) + %b = call bool %llvm.isnan(double %Y) + %COM = or bool %a, %b + ret bool %COM +}