[llvm] r239679 - [SelectionDAG] Added assertions + UNDEF handling for BSWAP node creation.
Simon Pilgrim
llvm-dev at redking.me.uk
Sat Jun 13 08:23:59 PDT 2015
Author: rksimon
Date: Sat Jun 13 10:23:58 2015
New Revision: 239679
URL: http://llvm.org/viewvc/llvm-project?rev=239679&view=rev
Log:
[SelectionDAG] Added assertions + UNDEF handling for BSWAP node creation.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=239679&r1=239678&r2=239679&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Jun 13 10:23:58 2015
@@ -3082,6 +3082,14 @@ SDValue SelectionDAG::getNode(unsigned O
if (OpOpcode == ISD::UNDEF)
return getUNDEF(VT);
break;
+ case ISD::BSWAP:
+ assert(VT.isInteger() && VT == Operand.getValueType() &&
+ "Invalid BSWAP!");
+ assert((VT.getScalarSizeInBits() % 16 == 0) &&
+ "BSWAP types must be a multiple of 16 bits!");
+ if (OpOpcode == ISD::UNDEF)
+ return getUNDEF(VT);
+ break;
case ISD::BITCAST:
// Basic sanity checking.
assert(VT.getSizeInBits() == Operand.getValueType().getSizeInBits()
More information about the llvm-commits
mailing list