Displaying 2 results from an estimated 2 matches for "bar_as1".
2017 Jan 03
2
Optimisation passes introducing address space casts
...%b = addrspacecast %T* %B to i8 addrspace(1)*
call void @llvm.memcpy.p1i8.p0i8.i64(i8 addrspace(1)* %a, i8* bitcast (%T* @G to i8*), i64 124, i32 4, i1 false)
call void @llvm.memcpy.p1i8.p1i8.i64(i8 addrspace(1)* %b, i8 addrspace(1)* %a, i64 124, i32 4, i1 false)
call void @bar_as1(i8 addrspace(1)* %b)
ret void
}
This time there is no pre-existing addrspacecast on the global @G to convince the optimiser that loading from @G through anything other than addrspace(0) is legal, but the current instcombine code produces this (which is what the test expects):
%B1 =...
2017 Jan 02
3
Optimisation passes introducing address space casts
Hi Mehdi,
Thanks for the reply - I’ve finally got round to trying to fix this based on your suggestion. I’ve got something that mostly works, but I just wanted to double-check something about the regression tests before I post a patch.
> The memcpy is supposed to be equivalent to a sequence of load and store. Here we are just failing to keep the property that the load is performed through