[PATCH] D76199: GlobalISel: Fix round lowering

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 08:42:13 PDT 2020


arsenm closed this revision.
arsenm marked 2 inline comments as done.
arsenm added a comment.

19a0350187906532b9aa9dcb1f6af95f9c2e8cc1 <https://reviews.llvm.org/rG19a0350187906532b9aa9dcb1f6af95f9c2e8cc1>



================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4691
   // result = trunc(src);
   // if (src < 0.0 && src != result)
   //   result += -1.0.
----------------
foad wrote:
> Not related to your patch, but couldn't this be `if (result > src)` ?
I don't see why not. I"m guessing this has been blindly copied around since AMDIL times, which didn't have all the compare types


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-intrinsic-round.mir:1
 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer %s -o - | FileCheck -check-prefix=GFX6 %s
----------------
sepavloff wrote:
> If the previous version of this file tested intrinsic `floor`, maybe it makes sense to keep that version (with necessary changes) under a new name, to keep tests for `floor`?
There's already a floor test, we didn't actually need the floor expansion


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

https://reviews.llvm.org/D76199





More information about the llvm-commits mailing list