Mingming Liu
8aa800614b
[AArch64][CostModel] Detects that {extract,insert}-element at lane 0 has the same cost as the other lane for vector instructions in the IR.
Currently, {extract,insert}-element has zero cost at lane 0 [1]. However, there is a cost (by fmov instruction [2], or ext/ins instruction) to move values from SIMD registers to GPR registers, when the element is used explicitly as integers.
See https://godbolt.org/z/faPE1nTn8, when fmov is generated for d* register -> x* register conversion.
Implementation-wise, add a private method `AArch64TTIImpl::getVectorInstrCostHelper` as a helper function. This way, instruction-based method could share the core logic (e.g.,
returning zero cost if type is legalized to scalar).
[1] 2cf320d41e/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp (L1853)
[2] 2cf320d41e/llvm/lib/Target/AArch64/AArch64InstrInfo.td (L8150-L8157)
Differential Revision: https://reviews.llvm.org/D128302
2022-09-09 09:47:30 -07:00
..
2022-09-09 09:47:30 -07:00
2022-03-18 16:51:57 +00:00
2022-07-15 10:18:17 +02:00
2022-02-04 14:15:41 +01:00
2022-09-02 09:27:13 +02:00
2021-12-02 03:53:50 -08:00
2022-04-10 22:25:05 +02:00
2022-09-09 15:30:17 +02:00
2022-06-28 00:08:37 -04:00
2022-03-06 11:16:22 +00:00
2022-04-08 09:49:44 +02:00
2022-04-08 09:49:44 +02:00
2022-04-08 09:49:44 +02:00
2022-04-08 09:49:44 +02:00
2022-06-26 14:56:35 +01:00
2022-07-01 17:04:48 +02:00
2022-03-22 14:00:07 +01:00
2022-05-24 17:22:16 +07:00
2022-06-26 14:56:35 +01:00
2022-06-26 14:56:35 +01:00
2022-09-09 13:09:59 +02:00
2022-01-06 14:38:19 +01:00
2022-09-02 11:36:07 +02:00
2021-12-02 03:53:50 -08:00
2021-12-02 03:53:50 -08:00
2022-09-02 09:27:13 +02:00
2022-09-08 14:53:06 +02:00
2022-06-03 12:24:33 +07:00