Page MenuHomePhabricator

[PowerPC] Improve i32 and-or-and on BPS.Select64 path to generate single rlwimi
AbandonedPublic

Authored by tingwang on Feb 18 2022, 12:53 AM.

Details

Reviewers
nemanjai
shchenz
jsji
Group Reviewers
Restricted Project
Summary

Some i32 logic operations that have operators without signext are effectively 32-bit operations, and should have been handled by Select32 to generate single rlwimi. However they are combined to 64-bit operations during DAGCombineExtBoolTrunc, and BPS.Select64 is not able to detect the simple pattern.

This patch looks for opportunities on Select64 path, and forward them to Select32 for proper handling to generate single rlwimi instruction.

Diff Detail

Unit TestsFailed

TimeTest
60,020 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,040 msx64 debian > libFuzzer.libFuzzer::large.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/LargeTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/large.test.tmp-LargeTest
60,020 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

Event Timeline

tingwang created this revision.Feb 18 2022, 12:53 AM
tingwang requested review of this revision.Feb 18 2022, 12:53 AM
jsji resigned from this revision.Jun 2 2022, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 7:50 AM
tingwang abandoned this revision.Mon, Jul 18, 11:15 PM

Close as real scenario for the benefit pattern is unclear.