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

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 11:10:16 PST 2016


tra added inline comments.


================
Comment at: llvm/test/Transforms/CodeGenPrepare/NVPTX/dont-sink-nop-addrspacecast.ll:14
+  ; CHECK-LABEL: l2:
+  ; CHECK-NOT: addrspacecast
+  %v2 = load i64, i64 addrspace(1)* %ptr_as1
----------------
jlebar wrote:
> tra wrote:
> > Could that be changed for a positive check at the location where you *do* want to see that addrspacecast?
> > 
> What problem would this solve?
Not having addrspacecast here does not prove that it's where it should be.
I don't know what exactly codegenprepare does, but what if sinking of addrspacecast did happen and for whatever reason it created its own BB just ahead of l2? The test would pass. This scenario is may be too far-fetched, so I'm OK with the test either way.


https://reviews.llvm.org/D26923





More information about the llvm-commits mailing list