{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/55073","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/55073/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/55073/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/55073/events","html_url":"https://github.com/rust-lang/rust/pull/55073","id":369935741,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNzM3ODE5","number":55073,"title":"rustc: Fix (again) simd vectors by-val in ABI","user":{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"labels":[{"id":583437191,"node_id":"MDU6TGFiZWw1ODM0MzcxOTE=","url":"https://api.github.com/repos/rust-lang/rust/labels/S-waiting-on-bors","name":"S-waiting-on-bors","color":"d3dddd","default":false}],"state":"open","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"node_id":"MDQ6VXNlcjE1NTIzOA==","avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikomatsakis","id":155238,"node_id":"MDQ6VXNlcjE1NTIzOA==","avatar_url":"https://avatars0.githubusercontent.com/u/155238?v=4","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":25,"created_at":"2018-10-14T19:35:12Z","updated_at":"2018-10-20T14:52:19Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/55073","html_url":"https://github.com/rust-lang/rust/pull/55073","diff_url":"https://github.com/rust-lang/rust/pull/55073.diff","patch_url":"https://github.com/rust-lang/rust/pull/55073.patch"},"body":"The issue of passing around SIMD types as values between functions has\r\nseen [quite a lot] of [discussion], and although we thought [we fixed\r\nit][quite a lot] it [wasn't]! This PR is a change to rustc to, again,\r\ntry to fix this issue.\r\n\r\nThe fundamental problem here remains the same, if a SIMD vector argument\r\nis passed by-value in LLVM's function type, then if the caller and\r\ncallee disagree on target features a miscompile happens. We solve this\r\nby never passing SIMD vectors by-value, but LLVM will still thwart us\r\nwith its argument promotion pass to promote by-ref SIMD arguments to\r\nby-val SIMD arguments.\r\n\r\nThis commit is an attempt to thwart LLVM thwarting us. We, just before\r\ncodegen, will take yet another look at the LLVM module and demote any\r\nby-value SIMD arguments we see. This is a very manual attempt by us to\r\nensure the codegen for a module keeps working, and it unfortunately is\r\nlikely producing suboptimal code, even in release mode. The saving grace\r\nfor this, in theory, is that if SIMD types are passed by-value across\r\na boundary in release mode it's pretty unlikely to be performance\r\nsensitive (as it's already doing a load/store, and otherwise\r\nperf-sensitive bits should be inlined).\r\n\r\nThe implementation here is basically a big wad of C++. It was largely\r\ncopied from LLVM's own argument promotion pass, only doing the reverse.\r\nIn local testing this...\r\n\r\nCloses #50154\r\nCloses #52636\r\nCloses #54583\r\nCloses #55059\r\n\r\n[quite a lot]: https://github.com/rust-lang/rust/pull/47743\r\n[discussion]: https://github.com/rust-lang/rust/issues/44367\r\n[wasn't]: https://github.com/rust-lang/rust/issues/50154"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/431588456","html_url":"https://github.com/rust-lang/rust/pull/55073#issuecomment-431588456","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/55073","id":431588456,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTU4ODQ1Ng==","user":{"login":"bors","id":3372342,"node_id":"MDQ6VXNlcjMzNzIzNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/3372342?v=4","gravatar_id":"","url":"https://api.github.com/users/bors","html_url":"https://github.com/bors","followers_url":"https://api.github.com/users/bors/followers","following_url":"https://api.github.com/users/bors/following{/other_user}","gists_url":"https://api.github.com/users/bors/gists{/gist_id}","starred_url":"https://api.github.com/users/bors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors/subscriptions","organizations_url":"https://api.github.com/users/bors/orgs","repos_url":"https://api.github.com/users/bors/repos","events_url":"https://api.github.com/users/bors/events{/privacy}","received_events_url":"https://api.github.com/users/bors/received_events","type":"User","site_admin":false},"created_at":"2018-10-20T14:52:19Z","updated_at":"2018-10-20T14:52:19Z","author_association":"CONTRIBUTOR","body":":hourglass: Testing commit 3cc8f738d4247a9b475d8e074b621e602ac2b7be with merge 09eaa73cee26e37bd14248d0433be186c6f57a94..."}}
{"actor":{"display_login":"bors"}}