This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Teach shouldSinkOperands to sink all true mask for scalable vector VP intrinsics.
AbandonedPublic

Authored by craig.topper on Mar 8 2022, 2:35 PM.

Details

Summary

Creating an all ones mask requires an insertelement and a shufflevector.
These will be pulled out of loops by LICM. We need to sink them back down so
our isel patterns can see them.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 8 2022, 2:35 PM
craig.topper requested review of this revision.Mar 8 2022, 2:35 PM

Maybe this isn't the problem that I assume it is. InstCombine might fold this to a constantexpr so it wouldn't be lifted by LICM?

craig.topper abandoned this revision.Mar 9 2022, 4:56 PM

Abandoning. Assuming InstCombine will take care of making it a ConstantExpr.