[PATCH] D69281: [FPEnv] Constrained FCmp intrinsics

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 09:46:08 PST 2019


uweigand added a comment.

In D69281#1770668 <https://reviews.llvm.org/D69281#1770668>, @pengfei wrote:

> > Adding an extra argument to the DAGnode  (sort of like FP_ROUND) also need special code all over the place to handle ...
>
> Hi @uweigand, I don't quite understand why we need special code all over the place to handle. From what I can see, `STRICT_FSETCCS` always have the same action with `STRICT_FSETCC` in common code.


I had the variant with the extra operand implemented initially, and what I was seeing was that made the node "special" because now we don't have the same set of operands between SETCC and STRICT_FSETCC any more.  Usually, the STRICT_ opcodes have the same set of operands as the regular operands, with the exception of the chain.  Code tends to assume that this is the case (e.g. when morphing a strict node into a regular node, or when writing a single legalization or other transformation that applies to both the strict and the regular node).  Having not just the chain, but one additional extra operand required code changes to handle that operand in various places.  Instead, with two DAG opcodes, you usually just have to add two more cases to a switch and that's it.

But those were really minor issues; the primary reason for me to switch was that I needed a way to tell common code which operations are legal, where the ISA has differences between signaling and quiet operations.  (On Z we always have both for scalar types, but for vector types we got the signaling operations at a later ISA level than the quiet ones).  This is trivial with two opcodes, but would require quite a bit of custom code if when using just a single one.


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

https://reviews.llvm.org/D69281





More information about the llvm-commits mailing list