[PATCH] D11847: [BasicAA] Fix zext & sext handling

Nick White via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 14:12:39 PDT 2015


njw45 created this revision.
njw45 added a reviewer: hfinkel.
njw45 added a subscriber: llvm-commits.

Un-revert of r241981 and fix for PR23626. The 'Or' case of GetLinearExpression delegates to 'Add' if possible, and if not it returns an Opaque value. Unfortunately the Scale and Offsets weren't being set (and so defaulted to 0) - and a scale of zero effectively removes the variable from the GEP instruction. This meant that BasicAA would return MustAliases when it should have been returning PartialAliases (and PR23626 was an example of the GVN pass using an incorrect MustAlias to merge loads from what should have been different pointers).

http://reviews.llvm.org/D11847

Files:
  lib/Analysis/BasicAliasAnalysis.cpp
  test/Analysis/BasicAA/bug.23540.ll
  test/Analysis/BasicAA/bug.23626.ll
  test/Analysis/BasicAA/q.bad.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11847.31542.patch
Type: text/x-patch
Size: 27832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150807/edf1b4a1/attachment.bin>


More information about the llvm-commits mailing list