[llvm] 41b5507 - DAG: Change round-mode operand type to i32 for FPTRUNC_ROUND (#106424)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 11:16:44 PDT 2024


Author: Changpeng Fang
Date: 2024-08-28T11:16:41-07:00
New Revision: 41b55071a13374654a290c01224eb066c38dc87a

URL: https://github.com/llvm/llvm-project/commit/41b55071a13374654a290c01224eb066c38dc87a
DIFF: https://github.com/llvm/llvm-project/commit/41b55071a13374654a290c01224eb066c38dc87a.diff

LOG: DAG: Change round-mode operand type to i32 for FPTRUNC_ROUND (#106424)

We need this immediate type to be consistent. This is the pre-commit for
https://github.com/llvm/llvm-project/pull/105761

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 8151dcfce9e4b0..d103308cce566a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -6957,8 +6957,7 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
     SDValue Result;
     Result = DAG.getNode(
         ISD::FPTRUNC_ROUND, sdl, VT, getValue(I.getArgOperand(0)),
-        DAG.getTargetConstant((int)*RoundMode, sdl,
-                              TLI.getPointerTy(DAG.getDataLayout())));
+        DAG.getTargetConstant((int)*RoundMode, sdl, MVT::i32));
     setValue(&I, Result);
 
     return;


        


More information about the llvm-commits mailing list