llvm-project
e9a4a501 - [Hexagon] Use unsigned compare for unsigned hwloop distance guard (#236824)

Commit
12 hours ago
[Hexagon] Use unsigned compare for unsigned hwloop distance guard (#236824) The hardware-loop pass guards the trip count of an unsigned less-than or less-or-equal loop with a signed comparison of the distance register. A distance of 0xffffffff, such as a bound of UINT32_MAX, is seen as -1, so the count is clamped to 1 and the loop exits after its first iteration. Use C2_cmpgtui for unsigned CmpLess so the distance is compared as an unsigned value. Signed loops and CmpGreater keep C2_cmpgti. Signed-off-by: Kushal Pal <kushpal@qti.qualcomm.com>
Author
Parents
Loading