[clang] [llvm] [IR] Fix GEP offset computations for vector GEPs (PR #75448)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 05:34:49 PST 2023
================
@@ -111,6 +111,20 @@ define void @test_evaluate_gep_as_ptrs_array(ptr addrspace(2) %B) {
ret void
}
+define void @test_overaligned_vec(i8 %B) {
+ ; This should be turned into a constexpr instead of being an instruction
+; CHECK-LABEL: @test_overaligned_vec(
+; TODO: In this test case, half is overaligned to 32 bits.
+; Vectors are bit-packed and don't respect alignment.
+; Thus, the byte offset of the second half in <2 x half> is 2 bytes, not 4 bytes:
----------------
nikic wrote:
Please do not interleave comments and CHECK lines. Move both comments outside the function.
https://github.com/llvm/llvm-project/pull/75448
More information about the llvm-commits
mailing list