diff options
author | Chris Lattner <sabre@nondot.org> | 2004-06-11 05:30:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-06-11 05:30:34 +0000 |
commit | c31ae50c04ca42f447c649c6a528e20ab3ea791f (patch) | |
tree | 04e59ff8cfade9d5d372285fa477a746511bd848 | |
parent | 57790422ca6f4d2af23a4e29af3c48a19a5cfbd8 (diff) | |
download | external_llvm-c31ae50c04ca42f447c649c6a528e20ab3ea791f.zip external_llvm-c31ae50c04ca42f447c649c6a528e20ab3ea791f.tar.gz external_llvm-c31ae50c04ca42f447c649c6a528e20ab3ea791f.tar.bz2 |
Test that the X86 backend is only emitting one fucom instruction
for each 'COM =' line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14147 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/X86/compare_folding.llx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/compare_folding.llx b/test/CodeGen/X86/compare_folding.llx new file mode 100644 index 0000000..3d8e6c7 --- /dev/null +++ b/test/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 +} |