Skip to content

Commit b800e1f

Browse files
ichenkaiigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 4adee35
Enable Dot and Add Ops to Dp4a Ops Optimization Enable Dot and Add Ops to Dp4a Ops Optimization.
1 parent 1c01d0a commit b800e1f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

IGC/Compiler/CustomSafeOptPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ void CustomSafeOptPass::visitShuffleIndex(llvm::CallInst* I)
402402
// %id317- = call i32 @llvm.genx.GenISA.dp4a.ss.i32(i32 %id213-, i32 %267, i32 %321)
403403
void CustomSafeOptPass::mergeDotAddToDp4a(llvm::CallInst* I)
404404
{
405-
if (IGC_IS_FLAG_ENABLED(DisableDotAddToDp4aMerge))
405+
if (!IGC_IS_FLAG_ENABLED(EnableDotAddToDp4aMerge))
406406
return;
407407

408408
// found %id213- = call i32 @llvm.genx.GenISA.dp4a.ss.i32(i32 0, i32 %305, i32 %345)

IGC/Compiler/tests/CustomSafeOptPass/DotAddToDp4a.ll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
; SPDX-License-Identifier: MIT
66
;
77
;============================ end_copyright_notice =============================
8+
; REQUIRES: regkeys
89
;
9-
; RUN: igc_opt --platformdg2 -igc-custom-safe-opt -S < %s --dce | FileCheck %s
10+
; RUN: igc_opt --platformdg2 --regkey EnableDotAddToDp4aMerge=1 -igc-custom-safe-opt -S < %s --dce | FileCheck %s
1011
; ------------------------------------------------
1112
; CustomSafeOptPass: DotAddToDp4a
1213
; ------------------------------------------------
1314
define void @test_DotAddToDp4a(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) {
1415
; CHECK-LABEL: @test_DotAddToDp4a(
1516
; CHECK: [[TMP1:%.*]] = call i32 @llvm.genx.GenISA.dp4a.ss.i32(i32 0, i32 %a, i32 %b)
16-
; CHECK: [[TMP2:%.*]] = call i32 @llvm.genx.GenISA.dp4a.ss.i32(i32 [[TMP1]], i32 %c, i32 %d)
17-
; CHECK: [[TMP3:%.*]] = call i32 @llvm.genx.GenISA.dp4a.ss.i32(i32 [[TMP2]], i32 %e, i32 %f)
1817
;
1918
%1 = call i32 @llvm.genx.GenISA.dp4a.ss.i32(i32 0, i32 %a, i32 %b)
2019
%2 = call i32 @llvm.genx.GenISA.dp4a.ss.i32(i32 0, i32 %c, i32 %d)

IGC/common/igc_flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ DECLARE_IGC_REGKEY(bool, EnableGEPLSR, true, "Enables GEP Loop Strength Reductio
289289
DECLARE_IGC_REGKEY(DWORD, GEPLSRThresholdRatio, 100, "Ratio for register pressure threshold in GEP Loop Strength Reduction pass", false)
290290
DECLARE_IGC_REGKEY(bool, EnableGEPLSRToPreheader, true, "Enables reduction to loop's preheader in GEP Loop Strength Reduction pass", false)
291291
DECLARE_IGC_REGKEY(DWORD, FPRoundingModeCoalescingMaxDistance, 20, "Max distance in instructions for reordering FP instructions with common rounding mode", false)
292-
DECLARE_IGC_REGKEY(bool, DisableDotAddToDp4aMerge, false, "Disable Dot and Add ops to Dp4a merge optimization.", false)
292+
DECLARE_IGC_REGKEY(bool, EnableDotAddToDp4aMerge, false, "Enable Dot and Add ops to Dp4a merge optimization.", false)
293293
DECLARE_IGC_REGKEY(bool, DisableInvalidateRTStackAfterLastRead, false, "Disables L1 cache invalidation after the last read of the RT stack. Affects rayqueries only", false)
294294

295295
DECLARE_IGC_GROUP("Shader debugging")

0 commit comments

Comments
 (0)