[PATCH] D120329: [SelectionDAG] Emit calls to __divei4 and friends for division/remainder of large integers
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 22 23:23:08 PST 2022
LuoYuanke added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:3921
+ "Unexpected argument type for lowering");
+ SDValue StackPtr = DAG.CreateStackTemporary(ArgVT, 4);
+ Entry.Node = StackPtr;
----------------
Just be curious. Why the alignment is 4 for all target?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:3925
+ Type *ArgTy = ArgVT.getTypeForEVT(*DAG.getContext());
+ Entry.Ty = PointerType::get(ArgTy, 0);
+ Entry.IsSExt = false;
----------------
Not sure if the pointer is "i32 *" or "i129 *".
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:3950
+ std::move(Args))
+ .setInRegister()
+ .setSExtResult(/*isSigned*/ false)
----------------
Will the parameter passed in register for i386?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:3952
+ .setSExtResult(/*isSigned*/ false)
+ .setZExtResult(/*!isSigned*/ true);
+
----------------
Given the return value is void, why set the S/ZExt?
================
Comment at: llvm/test/CodeGen/X86/udivmodei5.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s
+
----------------
Generate case for i386?
================
Comment at: llvm/test/CodeGen/X86/udivmodei5.ll:28
+; CHECK-NEXT: movq {{[0-9]+}}(%rsp), %rax
+; CHECK-NEXT: movq {{[0-9]+}}(%rsp), %rdx
+; CHECK-NEXT: addq $104, %rsp
----------------
Is there any ABI description that shows how to pass i129 parameter or return i129 value?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120329/new/
https://reviews.llvm.org/D120329
More information about the llvm-commits
mailing list