[llvm] [GlobalIsel] Visit ICmp (PR #105991)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 01:27:02 PDT 2024
tschuett wrote:
I tried a new version:
* canonicalization of icmps
* icmp x, 0
I removed the undef optimizations. There was too much discussion. Canonicalization is not an optimization. We do it blindly for as many opcodes as possible.
The `isKnownNonZero` analysis sits in Utils.cpp . It might be a bit code, but code size/complexity correlates with precision. I ported it from ValueTracking with adaptions to MIR. The version in ValueTracking is much larger/complex. You will still find the original comments. We need some precision for the icmp x,0 combine to have an effect on code size. I am interested in follow-on PRs too increase precision.
https://github.com/llvm/llvm-project/pull/105991
More information about the llvm-commits
mailing list