-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Closed
Copy link
Description
The issue arises only if the geps use opaque pointers, here is a working version and a broken one, both run with: --load-store-vectorizer -mtriple=amdgcn-amd-amdhsa
(https://godbolt.org/z/74oqP3Ks5)
%S = type { i64, i64 }
@S = external global %S
define i64 @order() {
%idx1 = getelementptr inbounds %S, %S* @S, i32 0, i32 1
%l1 = load i64, i64* %idx1, align 8
%idx0 = getelementptr inbounds %S, %S* @S, i32 0, i32 0
%l0 = load i64, i64* %idx0, align 8
%add = add i64 %l0, %l1
ret i64 %add
}
%S = type { i64, i64 }
@S = external global %S
define i64 @order() {
%idx1 = getelementptr inbounds %S, ptr @S, i32 0, i32 1
%l1 = load i64, i64* %idx1, align 8
%idx0 = getelementptr inbounds %S, ptr @S, i32 0, i32 0
%l0 = load i64, i64* %idx0, align 8
%add = add i64 %l0, %l1
ret i64 %add
}