Page MenuHomePhabricator

[SVE][CodeGen] Extend isConstantSplatValue to support ISD::SPLAT_VECTOR
ClosedPublic

Authored by kmclaughlin on Nov 12 2020, 9:26 AM.

Details

Summary

Updated the affected scalable_of_scalable tests in sve-gep.ll, as isConstantSplatValue now returns true in DAGCombiner::visitMUL and folds (mul x, 1) -> x

Diff Detail

Event Timeline

kmclaughlin created this revision.Nov 12 2020, 9:26 AM
kmclaughlin requested review of this revision.Nov 12 2020, 9:26 AM
RKSimon added inline comments.
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
148

Is there a truncOrSelf we can use?

  • Removed the EltSize < SplatVal.getBitWidth() check from isConstantSplatVector and used truncOrSelf instead
kmclaughlin marked an inline comment as done.Nov 13 2020, 10:48 AM
kmclaughlin added inline comments.
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
148

There was no truncOrSelf that I could use here, but I've added this in a separate patch (D91445)

sdesmalen accepted this revision.Nov 24 2020, 3:23 AM

Seems like a good change, LGTM!

This revision is now accepted and ready to land.Nov 24 2020, 3:23 AM
This revision was automatically updated to reflect the committed changes.
kmclaughlin marked an inline comment as done.