Skip to content

Commit 38f1569

Browse files
krystian-andrzejewskiigcbot
authored andcommitted
Revert of Remove redundant guard for a pattern of global imm offsets
Revert
1 parent e2c4ba8 commit 38f1569

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

IGC/Compiler/CISACodeGen/PatternMatchPass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2418,6 +2418,9 @@ bool CodeGenPatternMatch::MatchImmOffsetLSC(llvm::Instruction &I) {
24182418

24192419
llvm::Value *varOffset = isConstant0 ? addSubInst->getOperand(1) : addSubInst->getOperand(0);
24202420

2421+
if (!isA64AddressingModel && m_ctx->type != ShaderType::OPENCL_SHADER && IGC_GET_FLAG_VALUE(LscImmOffsMatch) < 2)
2422+
return false;
2423+
24212424
// HW does an early bounds check on varOffset for A32 messages. Thus, if varOffset
24222425
// is negative, then the bounds check fails early even though the immediate offset
24232426
// would bring the final calculation to a positive number.

IGC/Compiler/tests/EmitVISAPass/fold-immediates.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
8-
; REQUIRES: regkeys
8+
9+
; REQUIRES: temporarily-disabled, regkeys
910
;
1011
; RUN: igc_opt -platformbmg -igc-emit-visa %s -dx12 -inputcs -regkey DumpVISAASMToConsole | FileCheck %s
1112
; ------------------------------------------------

0 commit comments

Comments
 (0)