[PATCH] D108795: [PowerPC] Fix issue with lowering byval parameters.
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 10:12:04 PDT 2021
lei added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:4403
- if (ObjSize==1 || ObjSize==2 || ObjSize==4) {
- EVT ObjType = (ObjSize == 1 ? MVT::i8 :
- (ObjSize == 2 ? MVT::i16 : MVT::i32));
+ switch (ObjSize) {
+ case 1:
----------------
This case stmt basically does:
1. generate truc store for i8|i16|i32
2. push truc store to MemOps
I think it would be more clean to create a lambda that does both steps with `MVT::i[8|16|32]` as an arg and call it within the case stmts.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108795/new/
https://reviews.llvm.org/D108795
More information about the llvm-commits
mailing list