This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Extend CombinerHelper::matchConstantOp() to match constant splat vectors
ClosedPublic

Authored by aemerson on Sep 30 2021, 12:31 AM.

Details

Summary

This allows the "x op 0 -> x" fold to optimize vector constant RHSs.

Diff Detail

Event Timeline

aemerson created this revision.Sep 30 2021, 12:31 AM
aemerson requested review of this revision.Sep 30 2021, 12:31 AM
foad added inline comments.Sep 30 2021, 12:57 AM
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-trivial-arith.mir
33–36

Could you regenerate the checks and commit before this patch, to avoid all the CHECK-NEXT churn?

aemerson updated this revision to Diff 376157.Sep 30 2021, 4:18 AM

Rebase after test re-gen.

foad accepted this revision.Sep 30 2021, 5:11 AM
This revision is now accepted and ready to land.Sep 30 2021, 5:11 AM