[all-commits] [llvm/llvm-project] e072cf: [RISCV] Add immop_oneuse PatLeaf. Use it to replac...
Craig Topper via All-commits
all-commits at lists.llvm.org
Sat Dec 21 08:56:22 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e072cffe3b639e8c433138b10ff68dc577497cf8
https://github.com/llvm/llvm-project/commit/e072cffe3b639e8c433138b10ff68dc577497cf8
Author: Craig Topper <craig.topper at sifive.com>
Date: 2024-12-21 (Sat, 21 Dec 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVInstrInfo.td
Log Message:
-----------
[RISCV] Add immop_oneuse PatLeaf. Use it to replace some PatLeafs with ImmLeaf/IntImmLeaf. NFC (#120804)
If we needed a one use check of a constant, we used a PatLeaf instead of
an IntLeaf or IntImmLeaf so we could add the one use check.
Unfortunately, this required the custom code to be duplicated for GISel
too.
Instead we can use a PatLeaf that does the one use check and defers to
an IntLeaf or IntImmLeaf for the immediate check. This allows GISel to
automically import the IntLeaf/IntImmLeaf part and we only need the
custom GISel predicate in the immop_oneuse PatLeaf.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list