[PATCH] D106353: [PowerPC] use lfiwax/lfiwzx for scalar_to_vector + load at PWR7
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 25 23:55:00 PDT 2021
shchenz added a comment.
After more investigation, I think we don't need this patch.
`scalar_to_vector (scalar_load)` will put the scalar load result at the first element of the vector result and set other elements of the vector result as undef.
So it is always correct to convert `scalar_to_vector (scalar_load)` to a splat_load(all vector elements are the same). And we already improve the code gen for splat_load in https://reviews.llvm.org/D106555. I verified all the types in this patch v4i32/v4f32/v2i64_signext/v2i64_zeroext, it can be handled in patch https://reviews.llvm.org/D106555. We already recognize all of them as splat load.
The only unexpected case is the case `unadjusted_lxvwsx` in file `unadjusted_lxvwsx`. In this case, it has following patterns:
t7: v4i8,ch = load<(load (s32) from %ir.0)> t0, t2, undef:i64
This will be legalized as:
Legalizing node: t7: v4i8,ch = load<(load (s32) from %ir.0)> t0, t2, undef:i64
Analyzing result type: v4i8
Widen node result 0: t7: v4i8,ch = load<(load (s32) from %ir.0)> t0, t2, undef:i64
Creating new node: t15: i32,ch = load<(load (s32) from %ir.0)> t0, t2, undef:i64
Creating new node: t16: v4i32 = scalar_to_vector t15
Creating new node: t17: v16i8 = bitcast t16
T
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106353/new/
https://reviews.llvm.org/D106353
More information about the llvm-commits
mailing list