[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)
Pengcheng Wang via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 12 19:21:22 PST 2024
================
@@ -21351,6 +21372,17 @@ bool RISCVTargetLowering::splitValueIntoRegisterParts(
unsigned NumParts, MVT PartVT, std::optional<CallingConv::ID> CC) const {
bool IsABIRegCopy = CC.has_value();
EVT ValueVT = Val.getValueType();
+
+ if (ValueVT == (Subtarget.is64Bit() ? MVT::i128 : MVT::i64) &&
+ NumParts == 1 && PartVT == MVT::Untyped) {
+ // Pairs in Inline Assembly
+ MVT XLenVT = Subtarget.getXLenVT();
+ SDValue Lo, Hi;
+ std::tie(Lo, Hi) = DAG.SplitScalar(Val, DL, XLenVT, XLenVT);
----------------
wangpc-pp wrote:
```suggestion
auto [Lo, Hi] = DAG.SplitScalar(Val, DL, XLenVT, XLenVT);
```
https://github.com/llvm/llvm-project/pull/112983
More information about the cfe-commits
mailing list