llvm-6502/lib/Target/X86
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
..
.cvsignore
FloatingPoint.cpp Fix bug in previous checkin 2004-06-11 05:22:44 +00:00
InstSelectPattern.cpp
InstSelectSimple.cpp By far, one of the most common uses of isnan is to make 'isunordered' 2004-06-11 05:33:49 +00:00
Makefile Tablgen files for really simple instruction selector 2004-04-06 19:34:00 +00:00
PeepholeOptimizer.cpp Convert to the new TargetMachine interface. 2004-06-02 05:55:25 +00:00
Printer.cpp Convert to the new TargetMachine interface. 2004-06-02 05:55:25 +00:00
X86.h Tablgen files for really simple instruction selector 2004-04-06 19:34:00 +00:00
X86.td Add support for the printImplicitDefsBefore flag 2004-04-13 17:18:39 +00:00
X86AsmPrinter.cpp Convert to the new TargetMachine interface. 2004-06-02 05:55:25 +00:00
X86CodeEmitter.cpp Convert to the new TargetMachine interface. 2004-06-02 05:55:25 +00:00
X86FloatingPoint.cpp Fix bug in previous checkin 2004-06-11 05:22:44 +00:00
X86InstrBuilder.h Add assertion for scale verification. 2004-03-04 18:05:02 +00:00
X86InstrInfo.cpp
X86InstrInfo.h Introduce a new FP instruction type to separate the compare cases from the 2004-06-11 04:41:24 +00:00
X86InstrInfo.td No really, these are dead now 2004-06-11 04:50:14 +00:00
X86InstrSel.td Tablgen files for really simple instruction selector 2004-04-06 19:34:00 +00:00
X86InstrSelInfo.td Tablgen files for really simple instruction selector 2004-04-06 19:34:00 +00:00
X86ISelPattern.cpp
X86ISelSimple.cpp By far, one of the most common uses of isnan is to make 'isunordered' 2004-06-11 05:33:49 +00:00
X86JITInfo.h
X86PeepholeOpt.cpp Convert to the new TargetMachine interface. 2004-06-02 05:55:25 +00:00
X86RegisterInfo.cpp Add support for the setp instructions 2004-06-11 04:30:06 +00:00
X86RegisterInfo.h Another API change to MRegisterInfo::foldMemoryOperand. Instead of a 2004-03-14 20:14:27 +00:00
X86RegisterInfo.td
X86SimpInstrSelector.cpp Now that compare instructions aren't lumped in with the other twoargfp instructions, 2004-06-11 04:49:02 +00:00
X86TargetMachine.cpp Fix the fixed stack offset, patch contributed by Vladimir Prus 2004-06-10 06:19:25 +00:00
X86TargetMachine.h Convert to the new TargetMachine interface. 2004-06-02 05:55:25 +00:00