-
Notifications
You must be signed in to change notification settings - Fork 14.3k
DAG: Change round-mode operand type to i32 for FPTRUNC_ROUND #106424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We need this immediate type to be consistent.
@llvm/pr-subscribers-llvm-selectiondag Author: Changpeng Fang (changpeng) ChangesWe need this immediate type to be consistent. This is the pre-commit for #105761 Full diff: https://github.com/llvm/llvm-project/pull/106424.diff 1 Files Affected:
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;
|
You can test this locally with the following command:git-clang-format --diff 25d976b45cb5b3d222d3a9cd94caa8a54031bbb7 d2acd858ae79f5256a44ae1feca328118e4b220b --extensions cpp -- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp View the diff from clang-format here.diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 851c646b1c..4a2bd89ff9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -6955,9 +6955,9 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
SelectionDAG::FlagInserter FlagsInserter(DAG, Flags);
SDValue Result;
- Result = DAG.getNode(
- ISD::FPTRUNC_ROUND, sdl, VT, getValue(I.getArgOperand(0)),
- DAG.getTargetConstant((int)*RoundMode, sdl, MVT::i32));
+ Result =
+ DAG.getNode(ISD::FPTRUNC_ROUND, sdl, VT, getValue(I.getArgOperand(0)),
+ DAG.getTargetConstant((int)*RoundMode, sdl, MVT::i32));
setValue(&I, Result);
return;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Title is wrong, this is not an AMDGPU change
|
…24ccc2ecf Local branch amd-gfx 20624cc Merged main:73e0aa58666f235bef091735a5f189882acc1148 into amd-gfx:e64f6fcf29c6 Remote branch main 41b5507 DAG: Change round-mode operand type to i32 for FPTRUNC_ROUND (llvm#106424)
…6424) We need this immediate type to be consistent. This is the pre-commit for llvm#105761
We need this immediate type to be consistent. This is the pre-commit for #105761