[PATCH] D26803: Fix known zero bits for addrspacecast

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 12:38:36 PST 2016


yaxunl marked 3 inline comments as done.
yaxunl added a comment.

we are going to lose alignment info after addrspacecast, e.g., the following test will fail:

  ; CHECK-LABEL: @static_hem_addrspacecast(
  ; CHECK: , align 16
  define <2 x i64> @static_hem_addrspacecast() {
    %t = getelementptr <2 x i64>, <2 x i64>* @x, i32 7
    %t.asc = addrspacecast <2 x i64>* %t to <2 x i64> addrspace(1)*
    %tmp1 = load <2 x i64>, <2 x i64> addrspace(1)* %t.asc, align 1
    ret <2 x i64> %tmp1
  }

I guess that's a price we need to pay for correctness.


https://reviews.llvm.org/D26803





More information about the llvm-commits mailing list