Skip to content

Commit 068e5e3

Browse files
agrabezhigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 139edf8
Enabling CustomPasses for OpenCL Conservatively clear the NSW NUW flags, since they may not be preserved by the reassociation on CustomSafeOptPass
1 parent fd12370 commit 068e5e3

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
@@ -41,7 +41,7 @@ namespace TC
4141
bool enableVISAPreRASchedulerForRetry() const override { return true; }
4242

4343
bool NeedWAToTransformA32MessagesToA64() const override{ return true; }
44-
bool WADisableCustomPass() const override { return false; }
44+
bool WADisableCustomPass() const override { return true; }
4545
bool WAEnableMemOpt2ForOCL() const override { return true; }
4646

4747
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)