[llvm] [X86][SimplifyCFG][CodeGen] Support hoisting load/store with conditional faulting (PR #95515)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 07:59:26 PDT 2024


nikic wrote:

> > @KanRobert Constant folding an all-true/all-false mask is the absolute minimum, but there are many other optimizations that do not happen. For example, even something as basic as https://llvm.godbolt.org/z/ajbhr6qEh does not seem to work.
> > While the masked load/store intrinsics are target-independent and old, they are also only used in specific situations and introduced fairly late in optimization (during vectorization), so ability to further optimize them has never been particularly important in the past.
> 
> Well, then we can improve it in the future. This transform is run only when APX sub-feature conditional faulting is available. We haven't had a real machine for APX so we have time to do it.

That makes it worse, not better. It means it's not even possible to evaluate the real impact this is going to have until it is too late.

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


More information about the llvm-commits mailing list