[PATCH] D130370: [llvm] Always use Constant for FP_ROUND ISD Nodes

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 15:19:39 PDT 2022


barannikov88 added a comment.

In D130370#3673179 <https://reviews.llvm.org/D130370#3673179>, @DavidTruby wrote:

> Essentially I went with Constant because there were significantly more cases where `getIntPtrConstant` was used to construct the argument here than `getTargetConstant`. I'd be pretty happy with either as long as its consistent though! I suppose if it works correctly an i1 `TargetConstant` would probably make the most logical sense.

It may be worth to extract creation of FP_ROUND / STRICT_FP_ROUND into dedicated method of SelectionDAG (getFPExtendOrRound is an example, and it, by the way, uses getIntPtrConstant). This would localize creation of the constant operand.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130370



More information about the llvm-commits mailing list