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

Unit TestsFailed

TimeTest
390 mslinux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp
Script: -- : 'RUN: at line 3'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang --driver-mode=g++ -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mcmodel=large -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /mnt/disks/ssd0/agent/llvm-project/compiler-rt/test/hwasan/TestCases/sizes.cpp -nostdlib++ -lstdc++ -o /mnt/disks/ssd0/agent/llvm-project/build/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/sizes.cpp.tmp

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.