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 | 01cdb1b3670ee5dfacbf344182d8c79c09844393 (patch) | |
tree | 0f86add385f59a38bdcc873bc770987e2dacddb4 /lib/Bytecode/Analyzer/Analyzer.cpp | |
parent | c31ae50c04ca42f447c649c6a528e20ab3ea791f (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Analyzer/Analyzer.cpp')
0 files changed, 0 insertions, 0 deletions