[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-23 Thread Kai Luo via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1ceaec3e8104: [PowerPC][altivec] Optimize codegen of vec_promote (authored by lkail). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-23 Thread Kai Luo via Phabricator via cfe-commits
lkail added a comment. > but it might be a good idea to improve codegen for the insert which might be > more common. Yes. Usually `insertelement` is transformed to `BUILD_VECTOR` is SDAG, currently we don't have much optimization for `BUILD_VECTOR` in special patterns. Repository: rG LLVM

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-23 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. LGTM. This is a good idea and we should go ahead with this for anyone that uses `vec_promote`, but it might be a good idea to improve codegen for the insert which might be more common.

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-22 Thread Kai Luo via Phabricator via cfe-commits
lkail added inline comments. Comment at: clang/lib/Headers/altivec.h:14662 + vector unsigned char __res = + __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1); lkail wrote:

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-22 Thread Kai Luo via Phabricator via cfe-commits
lkail added inline comments. Comment at: clang/lib/Headers/altivec.h:14662 + vector unsigned char __res = + __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1); qiucf wrote:

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-22 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added inline comments. Comment at: clang/lib/Headers/altivec.h:14662 + vector unsigned char __res = + __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1); Could we just

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-22 Thread Kai Luo via Phabricator via cfe-commits
lkail updated this revision to Diff 552251. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158487/new/ https://reviews.llvm.org/D158487 Files: clang/lib/Headers/altivec.h clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c llvm/test/CodeGen/PowerPC/v

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-21 Thread Kai Luo via Phabricator via cfe-commits
lkail updated this revision to Diff 552226. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158487/new/ https://reviews.llvm.org/D158487 Files: clang/lib/Headers/altivec.h clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c llvm/test/CodeGen/PowerPC/v

[PATCH] D158487: [PowerPC][altivec] Optimize codegen of vec_promote

2023-08-21 Thread Kai Luo via Phabricator via cfe-commits
lkail created this revision. lkail added reviewers: nemanjai, shchenz, stefanp, PowerPC, amyk. Herald added a subscriber: kbarton. Herald added a project: All. lkail requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Accordin