llvm/lib
Chris Lattner 01cdb1b367 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
2004-06-11 05:33:49 +00:00
..
Analysis Don't grab the condition of unconditional branches! 2004-06-08 21:50:30 +00:00
Archive Use the new FileUtilities.h API for mapping a file into an address 2004-05-28 00:24:41 +00:00
AsmParser Remove some more dead code resulting from adding setTypeName(). 2004-05-28 00:21:06 +00:00
Bytecode Revert an unneeded interface change to Instruction.h 2004-06-11 03:06:43 +00:00
CodeGen Fix lowering to work correctly 2004-06-11 02:54:02 +00:00
Debugger "fix" a nasty race condition 2004-01-14 21:18:03 +00:00
ExecutionEngine Implement PR315: abort, don't warn, when missing external functions encountered 2004-06-01 21:49:00 +00:00
Linker Move some functions out of gccld.cpp to GenerateCode.cpp. This allows us 2004-06-02 00:22:24 +00:00
Support Make all of this functionality work directly on win32. Properly conditionalize 2004-06-07 19:37:24 +00:00
Target By far, one of the most common uses of isnan is to make 'isunordered' 2004-06-11 05:33:49 +00:00
Transforms Fix a bug in my checkin from last night that caused miscompilations of 2004-06-10 02:33:20 +00:00
VMCore Fix lowering to work correctly 2004-06-11 02:54:02 +00:00
Makefile CBackend is no longer here 2004-02-13 23:29:37 +00:00