[llvm] [RISCV][GISel] Support f32/f64 powi. (PR #117937)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 28 05:29:45 PST 2024


================
@@ -1290,9 +1290,10 @@ LegalizerHelper::libcall(MachineInstr &MI, LostDebugLocObserver &LocObserver) {
       return UnableToLegalize;
     }
     auto Libcall = getRTLibDesc(MI.getOpcode(), Size);
-    std::initializer_list<CallLowering::ArgInfo> Args = {
+    SmallVector<CallLowering::ArgInfo, 2> Args = {
         {MI.getOperand(1).getReg(), HLTy, 0},
         {MI.getOperand(2).getReg(), ITy, 1}};
+    Args[1].Flags[0].setSExt();
----------------
lenary wrote:

Actually, sorry, I'm not 100% sure about this - should we be using things like `TargetLowering::shouldSignExtendTypeInLibCall`/`TargetLowering::shouldExtendTypeInLibCall` to choose whether to (sign) extend? It's not clear to me we have a GISel equivalent to those callbacks, but I think we might need something like that?

https://github.com/llvm/llvm-project/pull/117937


More information about the llvm-commits mailing list