[llvm] [DAG] Constant Folding for U/SMUL_LOHI (PR #69437)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 02:07:33 PDT 2023


Pierre-vh wrote:

I did this after looking at #69324, where we emitted a couple of muls that were obviously foldable.
Now we also have a s_add that could be folded but it's emitted from a (bitcast (build_vector lo, hi)) and we can't look through bitcast/splat in the DAG apparently.

Again no sure how effective this is, i just thought it's a nice to have. We have one more instruction in the testcase but it's because we scalarized a bit more and needed to copy to a VGPR, so overall I think it improved it.

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


More information about the llvm-commits mailing list