[PATCH] D149507: [SeparateConstOffsetFromGEP] Fix bug handling negative offsets

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 20:09:30 PDT 2023


tstellar created this revision.
tstellar added reviewers: Peakulorain, ajwock, nikic.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
tstellar requested review of this revision.
Herald added a project: LLVM.

Negative offsets were being zero-extend when used as part of a computation
where the result was zero-extended.  This was causing negative offsets to
be converted to very large positive numbers.
e.g. -15 => 17179869124

Resolves #62379


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149507

Files:
  llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  llvm/test/Transforms/SeparateConstOffsetFromGEP/pr62379-zeroext-negative.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149507.518122.patch
Type: text/x-patch
Size: 5248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230429/54392f06/attachment-0001.bin>


More information about the llvm-commits mailing list