Skip to content

Commit a141e1a

Browse files
KanRobertCarlos Gálvez
authored andcommitted
[X86][CodeGen] Set mayLoad = 1 for LZCNT/POPCNT/TZCNTrm_(EVEX|NF)
Promoted and NF LZCNT/POPCNT/TZCNT were supported in llvm#79954. B/c null_frag is used in the patterns for these variants, tablgen can not infer mayLoad = 1 for them. This can be tested by MCA tests, which will be added after -mcpu=<cpu_with_apx> is supported.
1 parent 3250fb1 commit a141e1a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

llvm/lib/Target/X86/X86InstrMisc.td

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,11 +1166,12 @@ multiclass Lzcnt<bits<8> o, string m, SDPatternOperator node, X86TypeInfo t,
11661166
[(set t.RegClass:$dst, (node t.RegClass:$src1)),
11671167
(implicit EFLAGS)]>,
11681168
TB, Sched<[schedrr]>;
1169-
def rm#suffix : ITy<o, MRMSrcMem, t, (outs t.RegClass:$dst),
1170-
(ins t.MemOperand:$src1), m, unaryop_ndd_args,
1171-
[(set t.RegClass:$dst, (node (t.LoadNode addr:$src1))),
1172-
(implicit EFLAGS)]>,
1173-
TB, Sched<[schedrm]>;
1169+
let mayLoad = 1 in
1170+
def rm#suffix : ITy<o, MRMSrcMem, t, (outs t.RegClass:$dst),
1171+
(ins t.MemOperand:$src1), m, unaryop_ndd_args,
1172+
[(set t.RegClass:$dst, (node (t.LoadNode addr:$src1))),
1173+
(implicit EFLAGS)]>,
1174+
TB, Sched<[schedrm]>;
11741175
}
11751176

11761177
let Predicates = [HasLZCNT], Defs = [EFLAGS] in {

0 commit comments

Comments
 (0)