From: Eli Friedman Date: Thu, 13 Oct 2011 22:40:23 +0000 (+0000) Subject: Simplify and avoid undefined shift. Based on patch by Ahmed Charles. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8e4d0429de3d44a4c5b02b3d27cb0b78520609ba;p=oota-llvm.git Simplify and avoid undefined shift. Based on patch by Ahmed Charles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141903 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 0313f99908c..2ac52cfc366 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -3944,8 +3944,7 @@ SDValue ARMTargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG, } // Try an immediate VMVN. - uint64_t NegatedImm = (SplatBits.getZExtValue() ^ - ((1LL << SplatBitSize) - 1)); + uint64_t NegatedImm = (~SplatBits).getZExtValue(); Val = isNEONModifiedImm(NegatedImm, SplatUndef.getZExtValue(), SplatBitSize, DAG, VmovVT, VT.is128BitVector(),