Page MenuHomePhabricator

[LegalizeTypes][VP] Add integer promotion support for VP_SIGN_EXTEND and VP_ZERO_EXTEND
Needs ReviewPublic

Authored by Jimerlife on May 13 2022, 1:33 AM.

Details

Summary

Add integer promotion support for VP_SIGN_EXTEND and VP_ZERO_EXTEND like sign_extend and zero_extend

Diff Detail

Unit TestsFailed

TimeTest
60,140 msx64 debian > LLVM.CodeGen/NVPTX::wmma.py
Script: -- : 'RUN: at line 5'; "/usr/bin/python3.9" /var/lib/buildkite-agent/builds/llvm-project/llvm/test/CodeGen/NVPTX/wmma.py --ptx=60 --gpu-arch=70 > /var/lib/buildkite-agent/builds/llvm-project/build/test/CodeGen/NVPTX/Output/wmma.py.tmp-ptx60-sm_70.ll
60,040 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

Jimerlife created this revision.May 13 2022, 1:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2022, 1:33 AM
Jimerlife requested review of this revision.May 13 2022, 1:33 AM
Jimerlife updated this revision to Diff 429596.May 15 2022, 7:27 PM
Jimerlife updated this revision to Diff 429966.May 17 2022, 2:06 AM
Jimerlife updated this revision to Diff 429969.May 17 2022, 2:15 AM
Jimerlife updated this revision to Diff 429976.May 17 2022, 2:38 AM
craig.topper added inline comments.May 17 2022, 10:49 AM
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
748

This assert isn't useful, it's repeating the if condition.

752

This handling is quite different than what was done for the none-VP version. Are we only doing this so getNode will squash the de-generate SIGN_EXTEND/ZERO_EXTEND that we get when NVT == Res.getValueType()?

1983

No need for else if the if returned

1986

Using SExtPromotedInteger creates a SIGN_EXTEND_INREG node. But that doesn't preserve the mask and VL. Should we have VP_SIGN_EXTEND_INREG? @frasercrmck @simoll

2129

No need for else if the if returned

2132

ZExtPromotedInteger uses ISD::AND, should we have a VP_AND here?