Skip to content

Commit 0df1e81

Browse files
agrabezhigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 1c7bc51
Enabling CustomPasses for OpenCL Conservatively clear the NSW NUW flags, since they may not be preserved by the reassociation on CustomSafeOptPass
1 parent 3526b45 commit 0df1e81

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

IGC/AdaptorOCL/DriverInfoOCL.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace TC
4040
bool enableVISAPreRAScheduler() const override { return true; }
4141

4242
bool NeedWAToTransformA32MessagesToA64() const override{ return true; }
43-
bool WADisableCustomPass() const override { return false; }
43+
bool WADisableCustomPass() const override { return true; }
4444
bool WAEnableMemOpt2ForOCL() const override { return true; }
4545

4646
unsigned int GetLoopUnrollThreshold() const override { return 1280; }

IGC/Compiler/CustomSafeOptPass.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,14 +1379,6 @@ void CustomSafeOptPass::visitBinaryOperator(BinaryOperator& I)
13791379
if (nextInst->getOperand(i) == &I)
13801380
{
13811381
Value* newAdd = BinaryOperator::CreateAdd(src0imm ? I.getOperand(1) : I.getOperand(0), nextInst->getOperand(1 - i), "", nextInst);
1382-
1383-
// Conservatively clear the NSW NUW flags, since they may not be
1384-
// preserved by the reassociation.
1385-
bool IsNUW = isa<OverflowingBinaryOperator>(I) && I.hasNoUnsignedWrap() && nextInst->hasNoUnsignedWrap();
1386-
cast<BinaryOperator>(newAdd)->setHasNoUnsignedWrap(IsNUW);
1387-
nextInst->setHasNoUnsignedWrap(IsNUW);
1388-
nextInst->setHasNoSignedWrap(false);
1389-
13901382
nextInst->setOperand(0, newAdd);
13911383
nextInst->setOperand(1, I.getOperand(src0imm ? 0 : 1));
13921384
break;

0 commit comments

Comments
 (0)