llvm-project/llvm/unittests/CodeGen/GlobalISel
Konstantin Schwarz 64bef13f08 [GlobalISel] Look through truncs and extends in narrowScalarShift
If a G_SHL is fed by a G_CONSTANT, the lower and upper bits of the source can be
shifted individually by the constant shift amount.

However in case the shift amount came from a G_TRUNC(G_CONSTANT), the generic shift legalization
code was used, producing intermediate shifts that are potentially illegal on some targets.

This change teaches narrowScalarShift to look through G_TRUNCs and G_*EXTs.

Reviewed By: paquette

Differential Revision: https://reviews.llvm.org/D89100
2021-08-10 13:49:22 +02:00
..
CMakeLists.txt Reland [GlobalISel] Start using vectors in GISelKnownBits 2021-03-04 21:47:13 +01:00
CSETest.cpp [GlobalISel] NFC: Change LLT::vector to take ElementCount. 2021-06-24 11:26:12 +01:00
ConstantFoldingTest.cpp [GlobalISel] Remove ConstantFoldingMIRBuilder 2021-04-23 09:13:27 +01:00
GISelMITest.cpp AMDGPU/GlobalISel: Implement computeNumSignBitsForTargetInstr 2020-03-23 15:02:30 -04:00
GISelMITest.h [globalisel][legalizer] Separate the deprecated LegalizerInfo from the current one 2021-06-01 13:23:48 -07:00
GISelUtilsTest.cpp [GlobalISel] NFC: Change LLT::vector to take ElementCount. 2021-06-24 11:26:12 +01:00
KnownBitsTest.cpp [GlobalISel][KnownBits] Implement G_CTPOP 2021-08-06 09:48:39 -07:00
KnownBitsVectorTest.cpp [GlobalISel] Fix known bits for G_BSWAP and B_BITREVERSE not doing anything. 2021-07-17 23:07:16 -07:00
LegalizerHelperTest.cpp [GlobalISel] Look through truncs and extends in narrowScalarShift 2021-08-10 13:49:22 +02:00
LegalizerInfoTest.cpp GlobalISel: Use LLT in memory legality queries 2021-06-30 17:44:13 -04:00
LegalizerTest.cpp GlobalISel: Use LLT in memory legality queries 2021-06-30 17:44:13 -04:00
MachineIRBuilderTest.cpp CodeGen: Print/parse LLTs in MachineMemOperands 2021-06-30 16:54:13 -04:00
PatternMatchTest.cpp [GlobalISel] NFC: Change LLT::vector to take ElementCount. 2021-06-24 11:26:12 +01:00