llvm-project/llvm/lib
Chris Lattner 1c2be0e5a9 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
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
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 the prolog epilog code inserter to match the documentation and support 2004-06-10 06:23:35 +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
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