Patch adds two simple combines:
- G_FMUL(x, 1.0) -> x
- G_FMUL(G_FNEG(x), G_FNEG(y)) -> G_FMUL(x, y)
Patch additionally adds new combine tests for AArch64 target for these new rules.
(Split off from https://reviews.llvm.org/D87870)
Paths
| Differential D126005
[GISel] Add identity and fneg combines for G_FMUL Needs RevisionPublic Authored by mkitzan on May 19 2022, 12:15 PM.
Details Summary Patch adds two simple combines:
Patch additionally adds new combine tests for AArch64 target for these new rules.
Diff Detail
Event TimelineComment Actions General question about all these combines: why do we need them? Why wouldn't they be done at the IR level, or are they cleaning up code that could reasonably be introduced by legalization? Comment Actions These are combines which seem generally beneficial (not architecture specific) from the closed source backend I work on. They are beneficial for our backend, so we have been upstreaming these combines to improve GISel.
This revision now requires changes to proceed.Aug 17 2023, 4:23 PM
Revision Contents
Diff 430773 llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/combine-fmul.mir
|
This is illegal, no reason to check for it. Really we should just consistently use Register in the API