Move variable down to use

llvm-svn: 219867
This commit is contained in:
Matt Arsenault 2014-10-15 23:37:42 +00:00
parent 6909b5b567
commit 6de7af4242
1 changed files with 4 additions and 4 deletions

View File

@ -2160,10 +2160,6 @@ SDValue AMDGPUTargetLowering::PerformDAGCombine(SDNode *N,
WidthVal);
}
APInt Demanded = APInt::getBitsSet(32,
OffsetVal,
OffsetVal + WidthVal);
if ((OffsetVal + WidthVal) >= 32) {
SDValue ShiftVal = DAG.getConstant(OffsetVal, MVT::i32);
return DAG.getNode(Signed ? ISD::SRA : ISD::SRL, DL, MVT::i32,
@ -2171,6 +2167,10 @@ SDValue AMDGPUTargetLowering::PerformDAGCombine(SDNode *N,
}
if (BitsFrom.hasOneUse()) {
APInt Demanded = APInt::getBitsSet(32,
OffsetVal,
OffsetVal + WidthVal);
APInt KnownZero, KnownOne;
TargetLowering::TargetLoweringOpt TLO(DAG, !DCI.isBeforeLegalize(),
!DCI.isBeforeLegalizeOps());