Skip to content

Commit 7f3e378

Browse files
committed
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFC.
1 parent 7e6879b commit 7f3e378

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,12 +1095,12 @@ bool DAGCombiner::reassociationCanBreakAddressingModePattern(unsigned Opc,
10951095
N1.getOperand(0).getOpcode() == ISD::VSCALE &&
10961096
isa<ConstantSDNode>(N1.getOperand(1)))) &&
10971097
N1.getValueType().getFixedSizeInBits() <= 64) {
1098-
int64_t ScalableOffset =
1099-
N1.getOpcode() == ISD::VSCALE
1100-
? N1.getConstantOperandVal(0)
1101-
: (N1.getOperand(0).getConstantOperandVal(0) *
1102-
(N1.getOpcode() == ISD::SHL ? (1 << N1.getConstantOperandVal(1))
1103-
: N1.getConstantOperandVal(1)));
1098+
int64_t ScalableOffset = N1.getOpcode() == ISD::VSCALE
1099+
? N1.getConstantOperandVal(0)
1100+
: (N1.getOperand(0).getConstantOperandVal(0) *
1101+
(N1.getOpcode() == ISD::SHL
1102+
? (1LL << N1.getConstantOperandVal(1))
1103+
: N1.getConstantOperandVal(1)));
11041104
if (Opc == ISD::SUB)
11051105
ScalableOffset = -ScalableOffset;
11061106
if (all_of(N->uses(), [&](SDNode *Node) {

0 commit comments

Comments
 (0)