[PATCH] D150246: AMDGPU: remove an illegal transform for shl(or)
Ruiling, Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 10 00:30:20 PDT 2023
ruiling added a comment.
> It should help because `SelectionDAG::isBaseWithConstantOffset` knows how to match OR (if the known bits do not overlap) as well as ADD.
Do you mean we can optimize for `shl(or)` with the help of knownbits? I think I agree with you. But I am not sure whether it is really helpful in practical cases. The `isBaseWithConstantOffset` you mentioned specifically designed to work on stack slot access. I am not sure if such patterns can also be observed more broadly. And I think such kind of optimization should be done separately, maybe it should be added in the common LLVM code. And the lit-test should also be redesigned. I would rather fix the problematic transformation first. sounds ok to you?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150246/new/
https://reviews.llvm.org/D150246
More information about the llvm-commits
mailing list