Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.304 -> 1.305 --- Log message: Fold shifts with undef operands. --- Diffs of the changes: (+7 -0) SelectionDAG.cpp | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.304 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.305 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.304 Sat May 6 18:05:41 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon May 8 12:29:49 2006 @@ -1439,11 +1439,14 @@ case ISD::FSUB: case ISD::FDIV: case ISD::FREM: + case ISD::SRA: return N1; // fold op(undef, arg2) -> undef case ISD::UDIV: case ISD::SDIV: case ISD::UREM: case ISD::SREM: + case ISD::SRL: + case ISD::SHL: return getConstant(0, VT); // fold op(undef, arg2) -> 0 } } @@ -1467,9 +1470,13 @@ return N2; // fold op(arg1, undef) -> undef case ISD::MUL: case ISD::AND: + case ISD::SRL: + case ISD::SHL: return getConstant(0, VT); // fold op(arg1, undef) -> 0 case ISD::OR: return getConstant(MVT::getIntVTBitMask(VT), VT); + case ISD::SRA: + return N1; } } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits