diff options
| author | Duraid Madina <duraid@octopus.com.au> | 2005-04-02 10:33:53 +0000 |
|---|---|---|
| committer | Duraid Madina <duraid@octopus.com.au> | 2005-04-02 10:33:53 +0000 |
| commit | c935c833d13d1f04ceeb79b6683f0630c69e06f5 (patch) | |
| tree | 67606fc262c844d2a7fd3b6ee220e385af0c8d36 /llvm/lib | |
| parent | 0ccac38ed36d60fa92fc235f4d7f4fd94a5f1084 (diff) | |
| download | bcm5719-llvm-c935c833d13d1f04ceeb79b6683f0630c69e06f5.tar.gz bcm5719-llvm-c935c833d13d1f04ceeb79b6683f0630c69e06f5.zip | |
support IDEF, fnegabs (thanks sampo)
llvm-svn: 21023
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/IA64/IA64ISelPattern.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/Target/IA64/IA64ISelPattern.cpp b/llvm/lib/Target/IA64/IA64ISelPattern.cpp index 7b976fce3df..599f2891e13 100644 --- a/llvm/lib/Target/IA64/IA64ISelPattern.cpp +++ b/llvm/lib/Target/IA64/IA64ISelPattern.cpp @@ -609,6 +609,11 @@ unsigned ISel::SelectExpr(SDOperand N) { return Result; } + + case ISD::UNDEF: { + BuildMI(BB, IA64::IDEF, 0, Result); + return Result; + } case ISD::GlobalAddress: { GlobalValue *GV = cast<GlobalAddressSDNode>(N)->getGlobal(); @@ -799,9 +804,16 @@ assert(0 && "hmm, ISD::SIGN_EXTEND: shouldn't ever be reached. bad luck!\n"); } case ISD::FNEG: { - Tmp1 = SelectExpr(N.getOperand(0)); assert(DestType == MVT::f64 && "trying to fneg something other than f64?"); - BuildMI(BB, IA64::FNEG, 1, Result).addReg(Tmp1); + + if (ISD::FABS == N.getOperand(0).getOpcode()) { // && hasOneUse()? + Tmp1 = SelectExpr(N.getOperand(0).getOperand(0)); + BuildMI(BB, IA64::FNEGABS, 1, Result).addReg(Tmp1); // fold in abs + } else { + Tmp1 = SelectExpr(N.getOperand(0)); + BuildMI(BB, IA64::FNEG, 1, Result).addReg(Tmp1); // plain old fneg + } + return Result; } |

