[PATCH] D86393: [GISel] Add combines for unary FP instrs with constant operand
Michael Kitzan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 19:02:16 PDT 2020
mkitzan added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1486-1489
+ if (DstTy == S16)
+ V.convert(APFloat::IEEEhalf(), APFloat::rmNearestTiesToEven, &Unused);
+ else if (DstTy == S32)
+ V.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, &Unused);
----------------
arsenm wrote:
> We should probably have a getFltSemanticForLLT utility somewhere for this
Doesn't appear to be one for `LLT`. I suspect because unlike `Type`, with its discrete number of `TypeID`s, `LLT` is very open ended.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1506
+ assert(Cst.hasValue() && "Optional is unexpectedly empty!");
+ Builder.setInstr(MI);
+ MachineFunction &MF = Builder.getMF();
----------------
arsenm wrote:
> setInstrAndDebugLoc?
Right. Will pick this up in the next fixup.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86393/new/
https://reviews.llvm.org/D86393
More information about the llvm-commits
mailing list