Some CPUs don't support lahf/sahf.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Follow-up to: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150810/293071.html
This patch isn't ready yet:
- It needs to be taught about which CPUs support LAHF/SAHF and which don't.
- Code generation also needs to change in X86TargetLowering::ConvertCmpIfNecessary.
- Some tests need to be added.
The following tests are currently failing, and may need to be updated:
LLVM :: CodeGen/X86/2004-02-22-Casts.ll LLVM :: CodeGen/X86/2004-06-10-StackifierCrash.ll LLVM :: CodeGen/X86/2006-05-22-FPSetEQ.ll LLVM :: CodeGen/X86/2008-05-01-InvalidOrdCompare.ll LLVM :: CodeGen/X86/2009-02-12-SpillerBug.ll LLVM :: CodeGen/X86/2009-03-09-SpillerBug.ll LLVM :: CodeGen/X86/2012-08-28-UnsafeMathCrash.ll LLVM :: CodeGen/X86/2012-10-02-DAGCycle.ll LLVM :: CodeGen/X86/bitcast-int-to-vector.ll LLVM :: CodeGen/X86/block-placement.ll LLVM :: CodeGen/X86/cmovcmov.ll LLVM :: CodeGen/X86/cmpxchg-clobber-flags.ll LLVM :: CodeGen/X86/constpool.ll LLVM :: CodeGen/X86/crash.ll LLVM :: CodeGen/X86/fabs.ll LLVM :: CodeGen/X86/fp-stack-O0-crash.ll LLVM :: CodeGen/X86/fp-stack-compare.ll LLVM :: CodeGen/X86/fp-stack.ll LLVM :: CodeGen/X86/isnan.ll LLVM :: CodeGen/X86/peephole-na-phys-copy-folding.ll LLVM :: CodeGen/X86/scalar-fp-to-i64.ll LLVM :: CodeGen/X86/setuge.ll LLVM :: CodeGen/X86/stack-protector.ll LLVM :: CodeGen/X86/vec_fp_to_int.ll