-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][GISel] Legalize non-power-of-two G_CTTZ
The main change here is to add a `widenScalarToNextPow2` before the `clampScalar` so that non-power-of-two sizes between 32 and 64 are turned into s64 count trailing zeroes. However, if you make the legalisation rules depend on TypeIdx 0 (the output), then you still get crashes for the s65 testcase, which I solved by instead flipping the rules around to be about TypeIdx 1 (the input), with a `scalarSameSizeAs` at the end to tie index 0 to index 1. This, incidentally, is how things are written for `G_CTLZ`. Differential Revision: https://reviews.llvm.org/D147602
- Loading branch information
Showing
3 changed files
with
112 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters