[PATCH] D55568: AMDGPU: Don't peel of the offset if the resulting base could possibly be negative in Indirect addressing.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 12 19:21:57 PST 2018
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:1459
+ // the base (n0) to be negative.
+ if (CurDAG->SignBitIsZero(N0) || C1->getSExtValue() <= 0) {
+ Base = N0;
----------------
arsenm wrote:
> Why does the constant itself matter here? Needs a test with a negative offset
You should also make the cheaper check of the constant first. Why isn't this offset > 0 && SignBitIsZero?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55568/new/
https://reviews.llvm.org/D55568
More information about the llvm-commits
mailing list