[PATCH] D51203: AMDGPU: Handle 32-bit address wraparounds for SMRD opcodes
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 23 23:11:21 PDT 2018
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1362-1369
+ // A 32-bit (address + offset) can wrap around, while the same expression
+ // might not wrap around in 64 bits. We need to fix this case for tests that
+ // do (Addr - BigConst + BigConst), so assume that a "sufficiently small"
+ // offset never causes a wraparound. The chosen number is a guess. Address
+ // wraparounds are never expected to occur in normal apps.
+ if (Addr32Bit && (uint64_t)ByteOffset > 256 * 1024)
+ return false;
----------------
Can we check NUW flags on the add instead?
Repository:
rL LLVM
https://reviews.llvm.org/D51203
More information about the llvm-commits
mailing list