Page MenuHomePhabricator

[AArch64][SVE] Add DAG combine for load + dup_merge_passthru -> replicating load
AbandonedPublic

Authored by peterwaller-arm on Nov 23 2022, 8:36 AM.

Details

Summary

Since SVE replicating loads don't have post/pre increment addressing
modes, this is done as a DAG combine rather than an isel pattern so
that we can do this transform before post/pre increment are introduced.
As part of this, the existing replicating load patterns for splat have
been moved into this same DAG combine.

Diff Detail

Unit TestsFailed

TimeTest
60,050 msx64 debian > libFuzzer.libFuzzer::fuzzer-leak.test
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/LeakTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/fuzzer-leak.test.tmp-LeakTest
60,030 msx64 debian > libFuzzer.libFuzzer::minimize_crash.test
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/NullDerefTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/minimize_crash.test.tmp-NullDerefTest
60,030 msx64 debian > libFuzzer.libFuzzer::value-profile-load.test
Script: -- : 'RUN: at line 2'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/LoadTest.cpp -fsanitize-coverage=trace-gep -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/value-profile-load.test.tmp-LoadTest

Event Timeline

bsmith created this revision.Nov 23 2022, 8:36 AM
Herald added a reviewer: efriedma. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
bsmith requested review of this revision.Nov 23 2022, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 8:36 AM
Matt added a subscriber: Matt.Nov 23 2022, 4:03 PM
peterwaller-arm accepted this revision.Nov 28 2022, 4:05 AM

LGTM with minor comments.

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
20208

I replaced this return with an abort but don't see it fire for the check-llvm target. Is it possible to have a test for?

20218

Is this equivalent to SDValue(Load, 0).hasOneUse()?

This revision is now accepted and ready to land.Nov 28 2022, 4:05 AM
peterwaller-arm commandeered this revision.Dec 7 2022, 3:36 AM
peterwaller-arm edited reviewers, added: bsmith; removed: peterwaller-arm.

Thanks Bradley -- I'll continue this one in the near future though your input is welcomed.

This revision now requires review to proceed.Dec 7 2022, 3:36 AM
peterwaller-arm planned changes to this revision.Dec 7 2022, 3:36 AM
peterwaller-arm abandoned this revision.Dec 21 2022, 6:25 AM

An alternate route to implementation landed via D139637, D139850.