[PATCH] D65118: Analysis: Don't look through aliases when simplifying GEPs.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 16:33:32 PDT 2019


pcc added a comment.

In D65118#1596684 <https://reviews.llvm.org/D65118#1596684>, @plotfi wrote:

> I'm seeing a lit failure for gep-alias.ll on my end (Fedora 64bit). The output is:
>
>   $ /home/plotfi/Projects/llvm-project/build/bin/opt -instcombine -S -o - /home/plotfi/Projects/llvm-project/llvm/test/Analysis/ConstantFolding/gep-alias.ll
>   ; ModuleID = '/home/plotfi/Projects/llvm-project/llvm/test/Analysis/ConstantFolding/gep-alias.ll'
>   source_filename = "/home/plotfi/Projects/llvm-project/llvm/test/Analysis/ConstantFolding/gep-alias.ll"
>   target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
>   target triple = "x86_64-unknown-linux-gnu"
>  
>   @a = internal global [3 x i8*] zeroinitializer
>  
>   @b = linkonce_odr alias [3 x i8*], [3 x i8*]* @a
>  
>   define i8** @f() {
>     ret i8** getelementptr ([3 x i8*], [3 x i8*]* @b, i64 0, i64 1)
>   }
>  
>
>
> But you do a check for " ; CHECK: ret i8** getelementptr ([3 x i8*], [3 x i8*]* @b, i32 0, i32 1)" This seems odd.


I could have sworn that I ran this test before I committed, but now I'm seeing the same behaviour as you. r366764 should fix this.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65118/new/

https://reviews.llvm.org/D65118





More information about the llvm-commits mailing list