[llvm] [PowerPC] Check value uses in ValueBit tracking (PR #66040)

Chen Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 23:44:43 PST 2024


https://github.com/chenzheng1030 commented:

TBH, this is more like a workaround. Now you replace some known bits with `Variable` for operands that have more than one uses. This sounds not good. We should try to get analysis info as accurate as we can. The issue is how we use the analysis info and generate the instructions based on the analysis info. As you can see, now with this patch, the case `llvm/test/CodeGen/PowerPC/loop-instr-form-prepare.ll` becomes worse.

For the improvement in `llvm/test/CodeGen/PowerPC/loop-instr-form-prepare.ll`, as this IR is generated from ppc builtin `__rldimi`, I think the right way to fix this maybe adding an ppc intrinsic for the builtin and map the `__rldimi` to the new intrinsic and then select the intrinsic in the PPC ISEL td files. Since developer explicitly uses `__rldimi`, what the developer expects should be the corresponding PPC instruction rldimi? What do you think?

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


More information about the llvm-commits mailing list