[PATCH] D26923: [CodeGenPrepare] Don't sink non-cheap addrspacecasts.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 11:51:38 PST 2016


jlebar added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:829-832
+  if (auto *ASC = dyn_cast<AddrSpaceCastInst>(CI))
+    if (!TLI.isCheapAddrSpaceCast(ASC->getSrcAddressSpace(),
+                                  ASC->getDestAddressSpace()))
+      return false;
----------------
arsenm wrote:
> Braces
I thought we always omitted them if legal?

(I am very happy to adopt a different rule; I don't like this one at all, fwiw.)


https://reviews.llvm.org/D26923





More information about the llvm-commits mailing list