HomePhabricator

AMDGPU/GlobalISel: Fix negative offset folding for buffer_load

Authored by Petar.Avramovic on Apr 27 2021, 5:44 AM.

Description

AMDGPU/GlobalISel: Fix negative offset folding for buffer_load

Buffer_load does unsigned offset calculations. Don't fold
operands of 32-bit add that are likely to cause unsigned add
overflow (common case is when one of the operands is negative).

Differential Revision: https://reviews.llvm.org/D91336