[PATCH] D98486: [TableGen/GlobalISel] Emit MI_predicate custom code for PatFrags (not only PatFrag)

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 06:39:38 PST 2021


Petar.Avramovic added inline comments.


================
Comment at: llvm/test/TableGen/GlobalISelEmitterCustomPredicate.td:183
+
+def patfrags_test_pat : PatFrags<
+  (ops node:$x, node:$y, node:$z),
----------------
bjope wrote:
> Petar.Avramovic wrote:
> > You said that matcher code was emitted also for PatFrags. GlobalISel emmiter ignores this for me without the patch (does not report skip message either). Am I missing something/is that another test? Was the emitted match code broken?
> The checks added at the beginning of the test case failed for me. While the matcher table checks below were generated (passing the test) also without the fix.
> I haven't seen any problem with the matching. I limited the checks to verify that we get four GIM_Try blocks (the PatFrags has two patterns and both are commutative so 2x2=4 GIM_Try blocks is expected afaict).
Ah, I see it now. Those enums were missing PatFrags, but matchers  picked up the PatFrags. Looks good.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98486/new/

https://reviews.llvm.org/D98486



More information about the llvm-commits mailing list