Skip to content

Commit 80a8c07

Browse files
committed
Update the comment suggesting GISelShouldIgnore = 1 with a more accurate reason.
1 parent 8608ce7 commit 80a8c07

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Target/AMDGPU/VOP3Instructions.td

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
def BITOP3_32 : ComplexPattern<i32, 4, "SelectBITOP3", [and, or, xor]>;
1010
def BITOP3_16 : ComplexPattern<i16, 4, "SelectBITOP3", [and, or, xor]>;
1111

12-
// Matches PTRADD as a commutative operation. Patterns using this PatFrag must
13-
// set GISelShouldIgnore = 1 as commuting the corresponding G_PTR_ADD is
14-
// invalid.
12+
// Matches PTRADD as a commutative operation.
13+
// FIXME: Patterns using this PatFrag together with a C++ predicate must set
14+
// GISelShouldIgnore = 1 to avoid a bug in the GlobalISelMatchTable optimizer
15+
// that hoists the predicate check above the operand matching checks.
1516
def ptradd_commutative : PatFrags<(ops node:$src0, node:$src1),
1617
[(ptradd node:$src0, node:$src1), (ptradd node:$src1, node:$src0)]>;
1718

0 commit comments

Comments
 (0)