Skip to content

Commit 5f084f0

Browse files
committed
Revert "Ignore i64 ConstantInt indices from ExtractElement and InsertElement instructions that fit within 32 bits"
This reverts commit 77379d6.
1 parent 77379d6 commit 5f084f0

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

llvm/lib/Target/DirectX/DXILShaderFlags.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,24 +118,6 @@ void ModuleShaderFlags::updateFunctionFlags(ComputedShaderFlags &CSF,
118118
if (!CSF.Int64Ops) {
119119
for (const Value *Op : I.operands()) {
120120
if (Op->getType()->isIntegerTy(64)) {
121-
122-
// Special-case handling for ConstantInt indices of ExtractElement and
123-
// InsertElement instructions (likely inserted by the Scalarization
124-
// pass). As long as the constant indices fit within 32 bits, we do not
125-
// consider them to count as 64-bit integer usage.
126-
switch (I.getOpcode()) {
127-
case Instruction::ExtractElement:
128-
case Instruction::InsertElement:
129-
if (Op == I.getOperand(I.getNumOperands() - 1)) { // Index operand
130-
if (isa<ConstantInt>(Op)) {
131-
const ConstantInt *CI = cast<ConstantInt>(Op);
132-
// The constant index must fit within 32 bits
133-
if (CI->getZExtValue() <= UINT32_MAX)
134-
continue;
135-
}
136-
}
137-
}
138-
139121
CSF.Int64Ops = true;
140122
break;
141123
}

0 commit comments

Comments
 (0)