[PATCH] D74597: [AArch64][FPenv] Update chain of int to fp conversion

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 04:18:31 PST 2020


john.brawn added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1245
   SDValue Res = SDValue();
-
+  bool ReplaceChain = false;
   if (CustomLowerNode(N, N->getOperand(OpNo).getValueType(), false)) {
----------------
Instead of setting this per-opcode in the switch, it would be simpler to do

```
bool IsStrict = N->isStrictFPOpcode()
```
and then use IsStrict to decide if there's another result. This is also more similar to how we handle strict opcodes elsewhere in legalization.


================
Comment at: llvm/test/CodeGen/AArch64/strict-fp-int-promote.mir:67
+  bb.1.entry:
+    %0:_(s32) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.experimental.constrained.sitofp), %1(s32)
+
----------------
It would be good to have a test of uitfp as well. Also, is there any specific reason this is a .mir test instead of a .ll test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74597/new/

https://reviews.llvm.org/D74597





More information about the llvm-commits mailing list