summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-04-02 19:11:07 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-04-02 19:11:07 +0000
commite7ae400bc84affb33d51cbb06fbe9aee63dc99ea (patch)
tree0d8665e035f74a74b75ba2252d2bf0909aff1794 /llvm/lib
parent7ad3697e1e11075970aab7ef4475596d35c2dcb1 (diff)
downloadbcm5719-llvm-e7ae400bc84affb33d51cbb06fbe9aee63dc99ea.tar.gz
bcm5719-llvm-e7ae400bc84affb33d51cbb06fbe9aee63dc99ea.zip
FNEG/FABS/UNDEF
llvm-svn: 21029
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Alpha/AlphaISelPattern.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp b/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
index a0f3e8e93fe..4a40aa93e11 100644
--- a/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
+++ b/llvm/lib/Target/Alpha/AlphaISelPattern.cpp
@@ -537,15 +537,19 @@ unsigned ISel::SelectExprFP(SDOperand N, unsigned Result)
Node->dump();
assert(0 && "Node not handled!\n");
+ case ISD::UNDEF: {
+ BuildMI(BB, Alpha::IDEF, 0, Result);
+ return Result;
+ }
+
case ISD::FNEG:
if(ISD::FABS == N.getOperand(0).getOpcode())
{
Tmp1 = SelectExpr(N.getOperand(0).getOperand(0));
- BuildMI(BB, Alpha::CPYSN, 2, Result).addReg(Tmp1).addReg(Tmp1);
+ BuildMI(BB, Alpha::CPYSN, 2, Result).addReg(Alpha::F31).addReg(Tmp1);
} else {
Tmp1 = SelectExpr(N.getOperand(0));
- Opc = DestType == MVT::f64 ? Alpha::SUBT : Alpha::SUBS ;
- BuildMI(BB, Opc, 2, Result).addReg(Alpha::F31).addReg(Tmp1);
+ BuildMI(BB, Alpha::CPYSN, 2, Result).addReg(Tmp1).addReg(Tmp1);
}
return Result;
@@ -850,6 +854,12 @@ unsigned ISel::SelectExpr(SDOperand N) {
Node->dump();
assert(0 && "Node not handled!\n");
+
+ case ISD::UNDEF: {
+ BuildMI(BB, Alpha::IDEF, 0, Result);
+ return Result;
+ }
+
case ISD::DYNAMIC_STACKALLOC:
// Generate both result values.
if (Result != notIn)
OpenPOWER on IntegriCloud