[PATCH] D23896: [InstCombine] Try to resubmit the combine of A->B->A BitCast and fix for pr27996

Guozhi Wei via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 11:20:26 PDT 2016


Carrot added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:1768
@@ +1767,3 @@
+  for (User *U : CI.users()) {
+    if (!(isa<LoadInst>(U) || isa<StoreInst>(U)))
+      return false;
----------------
evstupac wrote:
> Here you check that for
> b = BitCast(p)
> All Users are 
> "st b", "st to address b" or "ld from address b"
> I don't see how your transformation can create BitCast for "load form b".
You are right. And BitCast used by Load is not handled by InstCombineLoadStoreAlloca.cpp.


https://reviews.llvm.org/D23896





More information about the llvm-commits mailing list