Luke Lau
742fb8b5c7
[DAGCombine] Fold (store (insert_elt (load p)) x p) -> (store x)
...
If we have a store of a load with no other uses in between it, it's
considered dead and is removed. So sometimes when legalizing a fixed
length vector store of an insert, we end up producing better code
through scalarization than without.
An example is the follow below:
%a = load <4 x i64>, ptr %x
%b = insertelement <4 x i64> %a, i64 %y, i32 2
store <4 x i64> %b, ptr %x
If this is scalarized, then DAGCombine successfully removes 3 of the 4
stores which are considered dead, and on RISC-V we get:
sd a1, 16(a0)
However if we make the vector type legal (-mattr=+v), then we lose the
optimisation because we don't scalarize it.
This patch attempts to recover the optimisation for vectors by
identifying patterns where we store a load with a single insert
inbetween, replacing it with a scalar store of the inserted element.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D152276
2023-06-28 22:45:04 +01:00
..
2023-02-09 18:45:20 +03:00
2023-01-05 13:21:20 +01:00
2022-12-19 12:56:12 +01:00
2023-02-09 18:45:20 +03:00
2023-01-12 12:40:04 +01:00
2023-01-05 13:21:20 +01:00
2023-01-14 19:12:18 +03:00
2022-12-19 12:56:12 +01:00
2023-06-14 22:27:15 +00:00
2023-01-05 13:21:20 +01:00
2023-06-28 22:45:04 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-02-06 20:36:11 -08:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-02-09 18:45:20 +03:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-09-21 12:50:12 +00:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-11-15 14:36:01 -08:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-06-21 10:30:43 -04:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-01-05 13:21:20 +01:00
2023-06-14 22:27:15 +00:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-10-29 15:40:26 -07:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-03-23 14:06:50 -07:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-03-01 15:33:45 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-02-09 18:45:20 +03:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-06-06 17:07:18 -04:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-05-17 17:03:15 +02:00
2022-12-19 12:56:12 +01:00
2022-11-23 09:04:42 +00:00
2023-01-13 10:34:27 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-01-05 13:21:20 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-06-14 22:27:15 +00:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-03-12 21:59:18 -04:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-01-05 13:21:20 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2022-12-19 12:56:12 +01:00
2023-06-18 13:32:40 -07:00
2022-12-19 12:56:12 +01:00