[clang] [llvm] [ValueTracking] Add dominating condition support in computeKnownBits() (PR #73662)

via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 14 04:35:06 PST 2023


XChy wrote:

> Optimization pipeline is doing simplifications and canonicalizations. If you for example use `-target amdcgn`, then I think you will see that the codegen is impacted negatively when not simplifying the control flow. So it depends on the backend if one form is profitable or not. I don't know really which form that should be considered best (simplest and easiest for most backends to deal with) here. Just saying that it changed. And that could indeed be one reason for regressions (as for our backend).

You're right, it depends on the backend. For GPU, it sounds good to hoist common operations as selects to realize it. But I'm not sure whether such transformation should happen in simplifycfg pass with specified target info(and option), or just in backend. If in simplifycfg, it may resist other optimizations between basic blocks.

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


More information about the cfe-commits mailing list