Duncan P. N. Exon Smith
95ff656ae0
AsmWriter: Write alloca array size explicitly (and -instcombine fixup)
...
Write the `alloca` array size explicitly when it's non-canonical.
Previously, if the array size was `iX 1` (where X is not 32), the type
would mutate to `i32` when round-tripping through assembly.
The testcase I added fails in `verify-uselistorder` (as well as
`FileCheck`), since the use-lists for `i32 1` and `i64 1` change.
(Manman Ren came across this when running `verify-uselistorder` on some
non-trivial, optimized code as part of PR5680.)
The type mutation started with r104911, which allowed array sizes to be
something other than an `i32`. Starting with r204945, we
"canonicalized" to `i64` on 64-bit platforms -- and then on every
round-trip through assembly, mutated back to `i32`.
I bundled a fixup for `-instcombine` to avoid r204945 on scalar
allocations. (There wasn't a clean way to sequence this into two
commits, since the assembly change on its own caused testcase churn, and
the `-instcombine` change can't be tested without the assembly changes.)
An obvious alternative fix -- change `AllocaInst::AllocaInst()`,
`AsmWriter` and `LLParser` to treat `intptr_t` as the canonical type for
scalar allocations -- was rejected out of hand, since this required
teaching them each about the data layout.
A follow-up commit will add an `-instcombine` to canonicalize the scalar
allocation array size to `i32 1` rather than leaving `iX 1` alone.
rdar://problem/20075773
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232200 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-13 19:30:44 +00:00
..
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2014-11-06 15:05:51 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2015-03-13 18:20:45 +00:00
2014-11-06 15:05:51 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-11-06 15:05:51 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2015-02-16 08:38:03 +00:00
2015-02-16 08:38:03 +00:00
2015-03-13 19:30:44 +00:00
2014-08-19 21:08:27 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2015-02-23 00:01:32 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-03-13 18:20:45 +00:00
2015-02-28 23:21:38 +00:00
2015-01-08 22:38:29 +00:00
2015-03-03 17:24:31 +00:00
2014-08-19 21:08:27 +00:00
2015-02-16 09:18:13 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-03-03 17:24:31 +00:00
2015-02-03 21:56:01 +00:00
2015-03-09 23:08:44 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2015-02-27 19:29:02 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2015-02-16 08:41:08 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-12-15 19:07:53 +00:00
2014-09-05 22:30:32 +00:00
2015-02-27 21:17:42 +00:00
2015-02-23 07:13:52 +00:00
2015-02-11 07:43:58 +00:00
2014-07-30 22:51:54 +00:00
2014-07-30 22:51:54 +00:00
2015-02-16 09:37:35 +00:00
2014-12-09 18:33:57 +00:00
2014-06-27 18:19:56 +00:00
2015-01-06 22:55:16 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:17:08 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 01:38:28 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2014-12-10 02:36:41 +00:00
2015-02-11 09:13:09 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:53 +00:00
2015-02-16 05:41:55 +00:00
2015-03-02 06:00:02 +00:00
2015-03-02 06:33:51 +00:00
2015-03-02 06:33:51 +00:00
2015-03-02 09:34:59 +00:00
2015-03-02 09:35:03 +00:00
2015-03-02 09:35:03 +00:00
2015-02-16 06:04:53 +00:00
2014-12-09 05:56:09 +00:00
2015-02-03 21:56:01 +00:00
2015-02-03 21:54:14 +00:00
2015-02-03 21:54:14 +00:00
2015-02-03 21:56:01 +00:00
2015-02-27 19:29:02 +00:00
2015-02-27 19:29:02 +00:00
2014-12-09 23:51:14 +00:00
2015-03-02 05:25:09 +00:00
2015-03-09 07:13:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-27 21:17:42 +00:00
2015-02-13 01:25:10 +00:00
2015-02-13 01:25:10 +00:00
2015-02-13 01:25:10 +00:00
2015-02-13 01:20:38 +00:00
2015-02-13 01:20:38 +00:00
2015-02-13 01:20:38 +00:00
2015-02-13 01:14:11 +00:00
2015-02-13 01:14:11 +00:00
2015-02-13 01:42:09 +00:00
2015-02-13 01:42:09 +00:00
2015-02-13 01:19:14 +00:00
2015-02-13 01:19:14 +00:00
2015-02-13 01:35:40 +00:00
2015-02-13 01:46:02 +00:00
2015-02-13 01:46:02 +00:00
2015-02-13 01:29:28 +00:00
2015-02-13 01:30:42 +00:00
2015-02-13 01:30:42 +00:00
2015-02-13 01:39:44 +00:00
2015-01-13 21:10:44 +00:00
2015-01-13 21:10:44 +00:00
2015-01-19 23:32:36 +00:00
2015-01-19 23:32:36 +00:00
2015-01-16 17:33:08 +00:00
2015-02-06 22:50:13 +00:00
2015-02-13 01:32:09 +00:00
2015-01-22 21:36:45 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2015-02-13 01:43:22 +00:00
2015-02-13 01:26:47 +00:00
2015-02-13 01:10:38 +00:00
2015-02-13 01:10:38 +00:00
2015-02-18 23:17:51 +00:00
2015-02-13 01:10:38 +00:00
2015-02-13 01:10:38 +00:00
2015-02-21 01:02:18 +00:00
2015-02-19 00:37:21 +00:00
2015-02-19 00:37:21 +00:00
2014-12-15 19:07:53 +00:00
2014-12-11 01:34:46 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-15 19:07:53 +00:00
2014-12-10 02:10:35 +00:00
2014-12-10 00:43:17 +00:00
2015-01-13 21:10:44 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2014-08-19 21:30:15 +00:00
2015-01-14 18:25:45 +00:00
2015-02-20 20:35:17 +00:00
2015-02-13 01:42:09 +00:00
2015-02-28 22:20:16 +00:00
2015-02-28 23:21:38 +00:00
2015-02-28 23:21:38 +00:00
2015-02-20 20:35:17 +00:00
2015-02-28 23:21:38 +00:00
2015-02-06 22:50:13 +00:00
2015-02-28 23:21:38 +00:00
2015-02-20 20:35:17 +00:00
2015-02-28 23:21:38 +00:00
2015-02-18 23:17:51 +00:00
2015-02-28 23:21:38 +00:00
2015-02-28 23:21:38 +00:00
2015-02-20 03:17:58 +00:00
2015-01-14 22:27:36 +00:00
2014-08-19 21:08:27 +00:00
2014-08-26 00:33:28 +00:00
2014-08-26 00:33:28 +00:00
2014-08-26 00:33:28 +00:00
2014-12-15 19:07:53 +00:00
2015-02-27 21:17:42 +00:00
2014-07-30 22:51:54 +00:00
2014-07-30 22:51:54 +00:00
2014-08-19 21:08:27 +00:00
2014-12-09 19:10:03 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2015-01-06 22:55:16 +00:00
2015-02-27 21:17:42 +00:00
2015-03-10 06:34:57 +00:00
2015-02-27 21:17:42 +00:00
2015-03-13 18:20:45 +00:00
2015-03-13 18:20:45 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00
2014-08-19 21:08:27 +00:00