[llvm] [PowerPC] Optimize BUILD_VECTOR from load and zeros (PR #73609)
Nemanja Ivanovic via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 00:16:42 PST 2023
================
@@ -3437,6 +3437,12 @@ def : Pat<(store (i32 (extractelt v4i32:$A, 1)), ForceXForm:$src),
def : Pat<(store (f32 (extractelt v4f32:$A, 1)), ForceXForm:$src),
(STIWX (EXTRACT_SUBREG $A, sub_64), ForceXForm:$src)>;
+// BUILD_VECTOR via loads and zeros.
+def : Pat<(v2f64 (build_vector (f64 (extloadf32 ForceXForm:$src)), (f64 fpimm0))),
----------------
nemanjai wrote:
Do we not have an opportunity to also improve the following:
- Non-extending load
- Single precision and i32 (other elements are zeros)
- Zero is at a different index
- Little endian
https://github.com/llvm/llvm-project/pull/73609
More information about the llvm-commits
mailing list