; Argpromote + scalarrepl should change this to passing the two integers by value.
define internal i32 @f(%struct.ss* inalloca %s) {
entry:
- %f0 = getelementptr %struct.ss* %s, i32 0, i32 0
- %f1 = getelementptr %struct.ss* %s, i32 0, i32 1
+ %f0 = getelementptr %struct.ss, %struct.ss* %s, i32 0, i32 0
+ %f1 = getelementptr %struct.ss, %struct.ss* %s, i32 0, i32 1
%a = load i32* %f0, align 4
%b = load i32* %f1, align 4
%r = add i32 %a, %b
define i32 @main() {
entry:
%S = alloca inalloca %struct.ss
- %f0 = getelementptr %struct.ss* %S, i32 0, i32 0
- %f1 = getelementptr %struct.ss* %S, i32 0, i32 1
+ %f0 = getelementptr %struct.ss, %struct.ss* %S, i32 0, i32 0
+ %f1 = getelementptr %struct.ss, %struct.ss* %S, i32 0, i32 1
store i32 1, i32* %f0, align 4
store i32 2, i32* %f1, align 4
%r = call i32 @f(%struct.ss* inalloca %S)