Implement a subset of builtins required for compatiblilty with AIX XL compiler.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCInstrInfo.td | ||
---|---|---|
3092 | I think we should conservatively set RM as an implicit def here. @ZhangKang you modified this code most recently, please provide your opinion here. |
Please change compact in the title to compat.
clang/include/clang/Basic/BuiltinsPPC.def | ||
---|---|---|
78–81 | I think at least some of these should be I because the parameter must be foldable to an integer constant expression (see Builtins.def). | |
llvm/include/llvm/IR/IntrinsicsPowerPC.td | ||
1588 | For parameters that need to be immediates, please mark them as such with the respective intrinsic property. | |
llvm/lib/Target/PowerPC/PPCInstrInfo.td | ||
3655 | Please review the order of operands carefully here. I believe the order is wrong either for this one or for the VSX version. Double-check all of the others as well please. | |
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-math.ll | ||
3 | Please add -mattr=-vsx to one of the run lines since you have added patterns for non-VSX but do not appear to be testing that code path. |
Address review comments to add/upate:
- builtin encoding for params that need to be folded into constant expr
- llvm intrinsic property for immediates
- test line for -mattr=-vsx
llvm/lib/Target/PowerPC/PPCInstrInfo.td | ||
---|---|---|
3655 | I double checked and both seem correct to me. |
LGTM other than the comment that wasn't addressed (which I assume will be addressed in a subsequent patch).
llvm/lib/Target/PowerPC/PPCInstrInfo.td | ||
---|---|---|
3092 | This was not addressed. Will this be added in a follow-up patch? |
llvm/lib/Target/PowerPC/PPCInstrInfo.td | ||
---|---|---|
3092 | Yes, sorry I will address this in a subsequent patch since adding RM will cause unrelated LIT failures. |
I think at least some of these should be I because the parameter must be foldable to an integer constant expression (see Builtins.def).