Displaying 1 result from an estimated 1 matches for "fcjcxi".
Did you mean:
fcjcxy
2020 Jun 19
2
Aliasing and forwarding optimization
----Snip--
struct st1{
int a;
};
struct st2{
int b;
};
struct st {
struct st1 obj1;
struct st2 obj2;
}Obj;
int test1(struct st1 * ptr1 , struct st2 * ptr2, struct st2 *ptr3) {
ptr1->a = 10;
*ptr3 = *ptr2;
return ptr1->a;
}
--Snip---
For the above case GCC is able to store forward the value 10 to the return
place.
LLVM is not doing this.
GCC
https://godbolt.org/z/FCjCXy
LLVM