[llvm] [GISel][CombinerHelper] Combine and(trunc(x), trunc(y)) -> trunc(and(x, y)) (PR #89023)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 06:24:34 PDT 2024


https://github.com/jayfoad commented:

Why is this a good idea? Intuitively it means we'll do the `and` in a wider type than necessary, which could end up generating more code if the wider type is wider than a register. Is it a canonicalization? Does it enable other optimizations? Is there a general strategy to pull truncs out of other expressions?

https://github.com/llvm/llvm-project/pull/89023


More information about the llvm-commits mailing list