Page MenuHomePhabricator

[DAGCombine] Hoist shifts out of a logic operations tree.
ClosedPublic

Authored by fzhinkin on Aug 4 2022, 11:35 AM.

Diff Detail

Unit TestsFailed

TimeTest
60,060 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

Event Timeline

fzhinkin created this revision.Aug 4 2022, 11:35 AM
fzhinkin requested review of this revision.Aug 4 2022, 11:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2022, 11:35 AM
fzhinkin edited the summary of this revision. (Show Details)Aug 4 2022, 11:37 AM
fzhinkin added reviewers: spatel, RKSimon.
fzhinkin edited the summary of this revision. (Show Details)Aug 8 2022, 2:24 AM
fzhinkin added inline comments.
llvm/test/CodeGen/X86/shift-combine.ll
510

I'll precommit new tests if there will be no objections to add the new transformation.

spatel added inline comments.Aug 8 2022, 6:10 AM
llvm/test/CodeGen/X86/shift-combine.ll
510

Yes - please go ahead with adding the tests.

fzhinkin updated this revision to Diff 451068.Aug 9 2022, 1:49 AM

Updated x86 tests

spatel added inline comments.Aug 9 2022, 7:09 AM
llvm/test/CodeGen/X86/shift-combine.ll
556

Can you vary the operand order in these tests to check the commuted patterns? It seems like we are only testing the case where the shifts are operand 0 of the logic ops.

fzhinkin updated this revision to Diff 451224.Aug 9 2022, 11:33 AM

Rebase

llvm/test/CodeGen/X86/shift-combine.ll
556

Done, thank you for suggestion

spatel accepted this revision.Aug 9 2022, 12:03 PM

LGTM

This revision is now accepted and ready to land.Aug 9 2022, 12:03 PM