- User Since
- Dec 14 2020, 7:16 AM (145 w, 4 d)
Jul 13 2023
Can you please rebase since the patch does not seem to apply?
Jul 4 2023
May 30 2023
Thanks! Closing this revision.
May 19 2023
May 17 2023
Regarding the lit test from andorbitset.ll, I don't think there's a simple way to preserve the bitset instruction with this change.
May 16 2023
Change test order a bit to prevent BB renaming change
May 15 2023
Implement shouldSinkOperands, remove old implementation from AMDGPULateCodegenPrepare.
Simplify checks a bit.
May 12 2023
May 11 2023
May 9 2023
Mar 31 2023
Mar 20 2023
Mar 17 2023
Mar 16 2023
What is the current state of this?
Feb 21 2023
Feb 17 2023
Can you please add some MIR test cases in addition to your LLVM IR tests? You already put some example code in the discussion, but I believe a test that shows the transformation on a GMIR level could be helpful.
Jan 25 2023
Jan 22 2023
Jan 20 2023
Can you re-apply clang-format on AMDGPULegalizerInfo.cpp please?
Jan 17 2023
Jan 11 2023
Jan 10 2023
Jan 9 2023
A few nits / questions, otherwise LGTM.
Jan 5 2023
Dec 30 2022
Dec 18 2022
It seems like this is breaking the LegalizerHelper.h / the LegalizerHelperTest:
/var/lib/buildkite-agent/builds/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h:47:7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 4 were provided
/var/lib/buildkite-agent/builds/llvm-project/llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp:641:19: error: no matching constructor for initialization of 'llvm::LegalizerHelper'
LegalizerHelper Helper(*MF, Info, Observer, B);
Dec 16 2022
Somethign went wrong during applying the patch. Could you please have a look?
Dec 12 2022
Dec 9 2022
If this is getting too complicated, we could still think about moving to intrinsics.
Nov 29 2022
Remove linter message
Added test to show the isDivergence behavior (copied from another test).
Changed run line to not test a specific architecture. This adds a few
s_movs to the lit tests, but shows the behavior of the isDivergence test
(the GFX10 behavior would be different).
Nov 22 2022
Made comments more concise.
Nov 21 2022
Moving constant check to visitExtractElementInst
Addressed review comments.
Don't access unreachable path when trying to constant-fold an extractelement with a select as index operand.
Nov 18 2022
Nov 15 2022
@spatel Thanks for adding these tests. These work in general, except the case where the second operand of the ExtractElement instruction is not a constant. The reason is that currently constantFoldOperationIntoSelectOperand expects both operands to be either the original select or a constant, but not an additional select, so a new extractelement instruction can be created to extract the actual value. If one of the operands is another select, it could be obvious that the sequence shows OOB behavior:
Fix assertion failures
Removed the whole custom implementation as InstCombine is already able
to do the constant folding, but the Visitor for extractelement needs an
additional check to prevent folding the constants into select operands
when the select uses a condition vector.
Remove superfluous dyn_cast for getAggregateElement.
Remove OOB logic. Simple cases will be handled earlier, so the relevant code
path will not be visited.
Nov 14 2022
Update lit tests.
Add additional test to show folding for other types.
Use Constants instead of ConstantInt.
Conditions must be Integer types, no vector types.
- Move logic to FoldOpIntoSelect.
- Remove superfluous use check for the extractelt instruction.
- Make use of early returns.
- Add more / fix existing comments.
Nov 10 2022
Fixed error on Windows build and whitespace issues.
Nov 9 2022
This change handles most of the tree structures, but not
all of them, because this would add way more complexity.