[llvm] [AMDGPU] Fix an issue that wrong index is used in calculation of byte provider when the op is extract_vector_elt (PR #91697)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 22:43:28 PDT 2024


jrbyrnes wrote:

I see a regression of class:

define hidden void @new(ptr addrspace(1) %in0, ptr addrspace(1) %in1, ptr addrspace(1) %out0) {
  %vec0 = load <4 x i32>, ptr addrspace(1) %in0, align 4
  %vec1 = load <4 x i32>, ptr addrspace(1) %in1, align 4
  %v0e1 = extractelement <4 x i32> %vec0, i64 1
  %v1e3 = extractelement <4 x i32> %vec1, i64 3
  %bc0 = bitcast i32 %v0e1 to <4 x i8>
  %bc1 = bitcast i32 %v1e3 to <4 x i8>
  %shuffle0_0 = shufflevector <4 x i8> %bc0, <4 x i8> %bc1, <4 x i32> <i32 3, i32 7, i32 4, i32 4>
  store <4 x i8> %shuffle0_0, ptr addrspace(1) %out0, align 4
  ret void
}


https://github.com/llvm/llvm-project/pull/91697


More information about the llvm-commits mailing list