[PATCH] D128582: Move SeparateConstOffsetFromGEPPass() before LSR() and enable EnableGEPOpt by default.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 05:27:44 PDT 2022


dmgreen added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/cond-br-tuning.ll:36
   %c = add nsw i32 %a, %b
-  %d = icmp ne i32 %c, 0
+  %d = icmp ne i32 %c, 10
   br i1 %d, label %L1, label %L2
----------------
gsocshubham wrote:
> dmgreen wrote:
> > %d = icmp ne i32 %c, 10
> Do you mean it to change it to `%d = icmp ne i32 %c, 0`?
> 
> It is already `%d = icmp ne i32 %c, 10`
Yeah sorry, that is what I meant. The store should be storing a value that isn't 0, so the csel isn't optimized away. The cmp should still not be present (it does get optimized, as it can re-use the adds flags).


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

https://reviews.llvm.org/D128582



More information about the llvm-commits mailing list