[PATCH] D21791: [InstCombine] Fix for trunc folding build break

Anna Thomas via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 06:50:16 PDT 2016

anna marked 3 inline comments as done.

Comment at: test/Transforms/InstCombine/trunc.ll:186
@@ +185,3 @@
+declare void @consume(i8) readonly
+define i1 @trunc_load_store(i8* align 2 %a) {
reames wrote:
> Add a comment about this only be legal for non-atomic loads since you essentially split the load here.
the load is not split/shrunk. Only the trunc is removed, and all uses of trunc replaced by corresponding store value.

Comment at: test/Transforms/InstCombine/trunc.ll:198
@@ +197,3 @@
+; CHECK: call void @consume(i8 0)
reames wrote:
> Add check lines for the other half of the original load.  

Added checks for making sure load is as it is.



More information about the llvm-commits mailing list