Skip to content

Commit ed642aa

Browse files
dfukalovjayfoad
andauthored
Update llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
Co-authored-by: Jay Foad <[email protected]>
1 parent 51827a6 commit ed642aa

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,12 +1430,7 @@ bool SIFoldOperandsImpl::tryFoldCndMask(MachineInstr &MI) const {
14301430
if (!PredI || !PredI->isCompare())
14311431
return false;
14321432

1433-
unsigned CmpOpc = PredI->getOpcode();
1434-
1435-
// Check if the comparison instruction is one of the expected ones.
1436-
const auto *CmpOpcI = find_if(
1437-
CmpOpcodes, [CmpOpc](unsigned Opcode) { return Opcode == CmpOpc; });
1438-
if (CmpOpcI == CmpOpcodes.end())
1433+
if (!is_contained(CmpOpcodes, PredI->getOpcode()))
14391434
return false;
14401435

14411436
// Check if the immediate value of the source operand matches the immediate

0 commit comments

Comments
 (0)