|
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
| #
b812e57a |
| 12-Aug-2024 |
Philip Reames <preames@rivosinc.com> |
[SCEV] Consolidate code for proving wrap flags of controlling finite IVs (#101404)
The canAssumeNoSelfWrap routine in howManyLessThans was doing two subtly
inter-related things. First, it was provi
[SCEV] Consolidate code for proving wrap flags of controlling finite IVs (#101404)
The canAssumeNoSelfWrap routine in howManyLessThans was doing two subtly
inter-related things. First, it was proving no-self-wrap. This exactly
duplicates the existing logic in the caller. Second, it was establishing
the precondition for the nw->nsw/nuw inference. Specifically, we need to
know that *this* exit must be taken for the inference to be sound.
Otherwise, another (possible abnormal) exit could be taken in the
iteration where this IV would become poison.
This change moves all of that logic into the caller, and caches the
resulting nuw/nsw flags in the AddRec. This centralizes the logic in one
place, and makes it clear that it all depends on controlling the sole
exit.
We do loose a couple cases with SCEV predication. Specifically, if SCEV
predication was able to convert e.g. zext(addrec) into an addrec(zext)
using predication, but didn't record the nuw fact on the new addrec,
then the consuming code can no longer fix this up. I don't think this
case particularly matters.
---------
Co-authored-by: Nikita Popov <github@npopov.com>
show more ...
|
|
Revision tags: llvmorg-19.1.0-rc2 |
|
| #
f0944f4b |
| 01-Aug-2024 |
Philip Reames <preames@rivosinc.com> |
[SCEV] Prove no-self-wrap from negative power of two step (#101416)
We have existing code which reasons about a step evenly dividing the
iteration space is a finite loop with a single exit implying
[SCEV] Prove no-self-wrap from negative power of two step (#101416)
We have existing code which reasons about a step evenly dividing the
iteration space is a finite loop with a single exit implying
no-self-wrap. The sign of the step doesn't effect this.
---------
Co-authored-by: Nikita Popov <github@npopov.com>
show more ...
|
| #
7583c484 |
| 31-Jul-2024 |
Philip Reames <preames@rivosinc.com> |
[SCEV] Use power of two facts involving vscale when inferring wrap flags (#101380)
SCEV has logic for inferring wrap flags on AddRecs which are known to
control an exit based on whether the step is
[SCEV] Use power of two facts involving vscale when inferring wrap flags (#101380)
SCEV has logic for inferring wrap flags on AddRecs which are known to
control an exit based on whether the step is a power of two. This logic
only considered constants, and thus did not trigger for steps such as (4
x vscale) which are common in scalably vectorized loops.
The net effect is that we were very sensative to the preservation of
nsw/nuw flags on such IVs, and could not infer trip counts if they got
lost for any reason.
---------
Co-authored-by: Nikita Popov <github@npopov.com>
show more ...
|
| #
faf33335 |
| 31-Jul-2024 |
Philip Reames <preames@rivosinc.com> |
[SCEV] Add coverage for flag inference with vscale strided IVs
Given vscale is a power of two, we should be able to prove no-self-wrap in these cases. We currently don't, but an upcoming change wil
[SCEV] Add coverage for flag inference with vscale strided IVs
Given vscale is a power of two, we should be able to prove no-self-wrap in these cases. We currently don't, but an upcoming change will fix this.
show more ...
|
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init |
|
| #
448bb5cf |
| 18-Jun-2024 |
Philip Reames <preames@rivosinc.com> |
[SCEV] Add coverage for variants of vscale indexing for EVL vectorized loops
|