[PATCH] D97665: [InstSimplify] Don't fold comparisons of non-inbounds GEPs

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 12:32:00 PDT 2021


nikic added inline comments.


================
Comment at: llvm/test/Transforms/InstSimplify/ConstProp/icmp-null.ll:203
 ; CHECK-LABEL: @global_gep_ugt_global_neg_offset(
-; CHECK-NEXT:    ret i1 true
+; CHECK-NEXT:    ret i1 icmp ugt ([2 x i32]* getelementptr ([2 x i32], [2 x i32]* @g, i64 -1), [2 x i32]* @g)
 ;
----------------
For the tests that changed, could you please add a copy that has the `inbounds` keyword, so that the folding case is still covered?


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

https://reviews.llvm.org/D97665



More information about the llvm-commits mailing list