From 7332f3e05d37b5bb772bb94e607fa04ef302af0f Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Sat, 2 Apr 2005 19:11:07 +0000 Subject: [PATCH] FNEG/FABS/UNDEF git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21029 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Alpha/AlphaISelPattern.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/Target/Alpha/AlphaISelPattern.cpp b/lib/Target/Alpha/AlphaISelPattern.cpp index a0f3e8e93fe..4a40aa93e11 100644 --- a/lib/Target/Alpha/AlphaISelPattern.cpp +++ b/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) -- 2.34.1