[llvm-dev] Possible bug in llvm::EmitGEPOffset

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu Aug 22 01:48:51 PDT 2019


On Thu, 22 Aug 2019 at 04:01, Francois Pichet via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> But what if Op is a variable that contains a negative number. In that case the nuw flag is wrong right?

I think so. I believe "nsw" would be correct though, since GEPs are
defined in terms of in-bounds signed arithmetic.

Cheers.

Tim.


More information about the llvm-dev mailing list