diff options
author | Chris Lattner <sabre@nondot.org> | 2004-06-11 05:33:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-06-11 05:33:49 +0000 |
commit | 1c2be0e5a9b2ec5e8035bdd72162a14db0d346d4 (patch) | |
tree | 76de335e5e38221f56ff28a59031206d19ccf37d /llvm/lib/Transforms | |
parent | 858cb55a5c98044ec5a7fbe3f02c5d7521d47c29 (diff) | |
download | bcm5719-llvm-1c2be0e5a9b2ec5e8035bdd72162a14db0d346d4.tar.gz bcm5719-llvm-1c2be0e5a9b2ec5e8035bdd72162a14db0d346d4.zip |
By far, one of the most common uses of isnan is to make 'isunordered'
comparisons. In an 'isunordered' predicate, which looks like this at
the LLVM level:
%a = call bool %llvm.isnan(double %X)
%b = call bool %llvm.isnan(double %Y)
%COM = or bool %a, %b
We used to generate this code:
fxch %ST(1)
fucomip %ST(0), %ST(0)
setp %AL
fucomip %ST(0), %ST(0)
setp %AH
or %AL, %AH
With this patch, we generate this code:
fucomip %ST(0), %ST(1)
fstp %ST(0)
setp %AL
Which should make alkis happy. Tested as X86/compare_folding.llx:test1
llvm-svn: 14148
Diffstat (limited to 'llvm/lib/Transforms')
0 files changed, 0 insertions, 0 deletions