This is an archive of the discontinued LLVM Phabricator instance.

[LV] Ignore the option prefer-predicate-over-epilogue for target unspported mask
AbandonedPublic

Authored by Allen on Jul 24 2023, 5:19 AM.

Details

Summary

If don't specified a target default, the option -prefer-predicate-over-epilogue will be ignored.
then, we can add option -enable-masked-interleaved-mem-accesses to get same behavior as before the changes.

Fixes https://github.com/llvm/llvm-project/issues/63977.

Diff Detail

Event Timeline

Allen created this revision.Jul 24 2023, 5:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 5:19 AM
Allen requested review of this revision.Jul 24 2023, 5:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 5:19 AM
Allen edited reviewers, added: craig.topper, david-arm; removed: lebedev.ri.Jul 24 2023, 5:21 AM
david-arm added inline comments.Jul 24 2023, 5:30 AM
llvm/lib/Target/ARM/ARMTargetTransformInfo.h
311

Maybe I'm missing something, but this feels like quite a huge change that isn't described in the subject line or in the commit message? Currently for RISCV and ARM backends this always returns false.

Enabling this by default for two different targets could cause performance regressions, and I'm not sure this is what you actually want?

I'm not sure I understand what this is trying to do, but yes, I'm pretty sure enableMaskedInterleavedAccessVectorization should not be enabled for MVE.

Allen added inline comments.Jul 24 2023, 5:44 AM
llvm/lib/Target/ARM/ARMTargetTransformInfo.h
311

The motivation is described in issue 63977. When the -prefer-predicate-over-epilogue=predicate-else-scalar-epilogue option is added, the common non-mask loop vector is still enabled, now https://gcc.godbolt.org/z/3z7e3rh1T

  • option -march=armv8.2-a -O3 can vectorize
  • option -march=armv8.2-a -O3 -mllvm -prefer-predicate-over-epilogue=predicate-else-scalar-epilogue cannot vectorize
Allen abandoned this revision.Jul 25 2023, 6:29 AM