diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-12-12 21:15:41 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-12-12 21:15:41 +0000 |
commit | c4499feb1a27fd6966c403fc559631fc1cffff33 (patch) | |
tree | cdff37f21399b69e7db2e47a31a9856631a45d72 /llvm/lib/Target/X86/X86ISelLowering.cpp | |
parent | 3b0da664bd0bc4b27aa1adbe56dbef518ba0a47b (diff) | |
download | bcm5719-llvm-c4499feb1a27fd6966c403fc559631fc1cffff33.tar.gz bcm5719-llvm-c4499feb1a27fd6966c403fc559631fc1cffff33.zip |
- Use patterns instead of creating completely new instruction matching patterns,
which are identical to the original patterns.
- Change the multiply with overflow so that we distinguish between signed and
unsigned multiplication. Currently, unsigned multiplication with overflow
isn't working!
llvm-svn: 60963
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index fd57ccf11b8..a9a2def0a67 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5217,9 +5217,10 @@ SDValue X86TargetLowering::LowerBRCOND(SDValue Op, SelectionDAG &DAG) { if (Cond.getOpcode() == ISD::SETCC) Cond = LowerSETCC(Cond, DAG); - else if (Cond.getOpcode() == X86ISD::ADD || - Cond.getOpcode() == X86ISD::SUB || - Cond.getOpcode() == X86ISD::MUL) + else if (Cond.getOpcode() == X86ISD::ADD || + Cond.getOpcode() == X86ISD::SUB || + Cond.getOpcode() == X86ISD::SMUL || + Cond.getOpcode() == X86ISD::UMUL) Cond = LowerXALUO(Cond, DAG); // If condition flag is set by a X86ISD::CMP, then use it as the condition @@ -6165,11 +6166,11 @@ SDValue X86TargetLowering::LowerXALUO(SDValue Op, SelectionDAG &DAG) { Cond = X86::COND_C; break; case ISD::SMULO: - BaseOp = X86ISD::MUL; + BaseOp = X86ISD::SMUL; Cond = X86::COND_O; break; case ISD::UMULO: - BaseOp = X86ISD::MUL; + BaseOp = X86ISD::UMUL; Cond = X86::COND_C; break; } @@ -6497,7 +6498,8 @@ const char *X86TargetLowering::getTargetNodeName(unsigned Opcode) const { case X86ISD::PCMPGTQ: return "X86ISD::PCMPGTQ"; case X86ISD::ADD: return "X86ISD::ADD"; case X86ISD::SUB: return "X86ISD::SUB"; - case X86ISD::MUL: return "X86ISD::MUL"; + case X86ISD::SMUL: return "X86ISD::SMUL"; + case X86ISD::UMUL: return "X86ISD::UMUL"; } } |