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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits