[llvm] AMDGPU: Change round-mode operand type to i32 for FPTRUNC_ROUND (PR #106424)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 10:50:41 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-selectiondag
Author: Changpeng Fang (changpeng)
<details>
<summary>Changes</summary>
We need this immediate type to be consistent. This is the pre-commit for https://github.com/llvm/llvm-project/pull/105761
---
Full diff: https://github.com/llvm/llvm-project/pull/106424.diff
1 Files Affected:
- (modified) llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (+1-2)
``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 60dcb118542785..851c646b1cb333 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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/106424
More information about the llvm-commits
mailing list