Commits

Michael Gottesman committed f47d8714b20
Reapply "[sil-combine] (struct_extract (load %x) #vardecl) -> (load (struct_element_addr %x #vardecl))" This reapplies commit r10605 with the relevant fixes. The specific bug had to do with the original code inserting the new load/struct_element_addr at the struct_extract instead of at the load instruction. As an example of this consider the following: %y = (load %x) (do_stuff) (struct_extract %y #vardecl) if (do_stuff) modifies the memory at %x that aliases what we would be extracting from %y, then transforming the code to: (do_stuff) %y = (struct_element_addr %x #vardecl) (load %y) would yield an incorrect value. This patch changes the transformation so that we perform the following transformation instead: %y = (struct_element_addr %x #vardecl) (load %y) (do_stuff) which will resolve the issue. This peephole triggers 365 times in the stdlib. Swift SVN r10619