Page MenuHomePhabricator

[TargetLowering][RISCV] Fixed a scalable vector issue when lowering [s|u]mul.overflow intrinsics
AcceptedPublic

Authored by tangxingxin1008 on Sep 15 2021, 12:19 AM.

Details

Summary
Fixed the vector type issue that where we used getVectorNumElements()
should be replaced by getVectorElementCount() when lowering these
intrinsics.

This is similar to D94149

Signed-off-by: Eric Tang <tangxingxin1008@gmail.com>

Diff Detail

Unit TestsFailed

TimeTest
110 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-cxa-atexit.S
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-cxa-atexit.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-cxa-atexit.S
130 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-static-initializer.S
Script: -- : 'RUN: at line 7'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-static-initializer.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-static-initializer.S
80 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-tls.S
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-tls.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-tls.S

Event Timeline

tangxingxin1008 requested review of this revision.Sep 15 2021, 12:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2021, 12:19 AM
frasercrmck accepted this revision.Sep 16 2021, 1:12 AM

LGTM, thanks!

This revision is now accepted and ready to land.Sep 16 2021, 1:12 AM

Does this affect AArch64 too?

craig.topper retitled this revision from [RISCV] Fixed a scalable vector issue when lowering [s|u]mul.overflow intrinsics to [TargetLowering][RISCV] Fixed a scalable vector issue when lowering [s|u]mul.overflow intrinsics.Sep 18 2021, 4:11 PM

Does this affect AArch64 too?

Yes, I test it on AArch64 sve.
After add this patch, there is no problem on the legal scalable vector that AArch64 sve support, but failed on the vector that need be Widened, such as <n x 1 x i1>.

craig.topper accepted this revision.Sep 22 2021, 11:48 AM

LGTM. Would be nice if you added AArch64 test cases that would fail without this patch as well.

Add AArch64 sve test case. Address Craig Topper's suggestion.