[PATCH] D54121: [FPEnv] Add constrained FCMP intrinsic
Andy Kaylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 7 14:44:55 PST 2018
andrew.w.kaylor added a comment.
I think my preference would be to have the predicate in the function name. I briefly toyed with the idea of hacking AsmWriter to print a constant integer as the corresponding predicate string, but I think that would look too weird. Also, I don't think we should open the door to something trying to use the value that represents the predicate as if it were a real value. In this sense the predicate argument, if we had one, should really be a token but I don't think we want to add new token constants just for this.
So this is what I'm imagining
def int_experimental_constrained_fcmp_eq_quiet : Intrinsic<[ llvm_anyi1_ty ],
[ llvm_anyfloat_ty,
LLVMScalarOrSameVectorWidth<0, llvm_anyfloat_ty>,
llvm_metadata_ty,
llvm_metadata_ty ]>;
And then 21 more of those. I've been talking to Craig about a way to make this a little more compact with multiclass, but that's the general idea.
What do you think?
Repository:
rL LLVM
https://reviews.llvm.org/D54121
More information about the llvm-commits
mailing list