[PATCH] D157690: [GlobalISel] Rewrite some simple rules using MIR Patterns
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 02:32:56 PDT 2023
foad added a comment.
Thanks! These are some really nice examples to study.
================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:674-675
+ (defs root:$dst),
+ (match (G_FNEG $tmp, $x),
+ (G_FABS $dst, $tmp)),
+ (apply (G_FABS $dst, $x))>;
----------------
Is the order of instructions significant here? Would it still match if I wrote `(match (G_FABS $dst, $tmp), (G_FNEG $tmp, $x))` instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157690/new/
https://reviews.llvm.org/D157690
More information about the llvm-commits
mailing list