[PATCH] D31531: Remove readnone from invariant.group.barrier

Krzysztof Pszeniczny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 10:17:42 PDT 2017


amharc added inline comments.


================
Comment at: test/Transforms/EarlyCSE/invariant.group.barrier.ll:16
+    %ptr3 = call i8* @llvm.invariant.group.barrier(i8* %ptr)
+; CHECK: call void @clobber(i8* {{.*}}%ptr)
+    call void @clobber(i8* %ptr)
----------------
Wouldn't it be more readable to call 2x use + 1x clobber instead of 3x clobber? Only one of the clobbers necessitates a reload below, and the others are here only to check if ptr3 is replaced with ptr2, right?


================
Comment at: test/Transforms/Util/MemorySSA/invariant-groups.ll:24
 
 ; This have to be MemoryUse(1), because we can't skip the barrier based on
 ; invariant.group.
----------------
Unrelated to this patch, but: the comment mentions MemoryUse(1), but the check below looks for MemoryUse(2).


https://reviews.llvm.org/D31531





More information about the llvm-commits mailing list