[PATCH] D78092: [GlobalISel] add legalization for G_FREEZE
Dominik Montada via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 07:37:37 PDT 2020
gargaroff marked an inline comment as done.
gargaroff added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1772
+ Observer.changingInstr(MI);
+ widenScalarSrc(MI, WideTy, 1, TargetOpcode::G_ANYEXT);
+ widenScalarDst(MI, WideTy);
----------------
arsenm wrote:
> Is this what the DAG does? I would be slightly surprised that undef high bits would be OK
I'm not familiar with SelectionDAG, so I might have misunderstood the extension used.
This is the code in the DAG:
```
SDValue DAGTypeLegalizer::PromoteIntRes_FREEZE(SDNode *N) {
SDValue V = GetPromotedInteger(N->getOperand(0));
return DAG.getNode(ISD::FREEZE, SDLoc(N),
V.getValueType(), V);
}
```
In the documentation of `GetPromotedInteger` it says that the upper bits contain rubbish, which suggested to me that this corresponds to `G_ANYEXT`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78092/new/
https://reviews.llvm.org/D78092
More information about the llvm-commits
mailing list