Skip to content

Commit 4942e51

Browse files
committed
[ARM] Introduce intrinsics for MVE vcmp under strict-fp.
Similar to #169156 again, this adds intrinsics for strict-fp compare nodes to make sure they end up as the original instruction.
1 parent dde9659 commit 4942e51

File tree

5 files changed

+3911
-1451
lines changed

5 files changed

+3911
-1451
lines changed

clang/include/clang/Basic/arm_mve_defs.td

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ def icmp_sgt: IRBuilder<"CreateICmpSGT">;
114114
def icmp_sge: IRBuilder<"CreateICmpSGE">;
115115
def icmp_slt: IRBuilder<"CreateICmpSLT">;
116116
def icmp_sle: IRBuilder<"CreateICmpSLE">;
117-
def fcmp_eq: IRBuilder<"CreateFCmpOEQ">;
118-
def fcmp_ne: IRBuilder<"CreateFCmpUNE">; // not O: it must return true on NaNs
119-
def fcmp_gt: IRBuilder<"CreateFCmpOGT">;
120-
def fcmp_ge: IRBuilder<"CreateFCmpOGE">;
121-
def fcmp_ult: IRBuilder<"CreateFCmpULT">;
122-
def fcmp_ule: IRBuilder<"CreateFCmpULE">;
117+
def fcmp_eq_node: IRBuilder<"CreateFCmpOEQ">;
118+
def fcmp_ne_node: IRBuilder<"CreateFCmpUNE">; // not O: it must return true on NaNs
119+
def fcmp_gt_node: IRBuilder<"CreateFCmpOGT">;
120+
def fcmp_ge_node: IRBuilder<"CreateFCmpOGE">;
121+
def fcmp_ult_node: IRBuilder<"CreateFCmpULT">;
122+
def fcmp_ule_node: IRBuilder<"CreateFCmpULE">;
123123
def splat: CGHelperFn<"ARMMVEVectorSplat">;
124124
def select: IRBuilder<"CreateSelect">;
125125
def fneg: IRBuilder<"CreateFNeg">;
@@ -593,6 +593,18 @@ def fminnm : strictFPAlt<IRIntBase<"minnum", [Vector]>,
593593
IRInt<"vminnm", [Vector]>>;
594594
def fmaxnm : strictFPAlt<IRIntBase<"maxnum", [Vector]>,
595595
IRInt<"vmaxnm", [Vector]>>;
596+
def fcmp_eq : strictFPAlt<fcmp_eq_node,
597+
IRInt<"cmp_eq", [Predicate, Vector]>>;
598+
def fcmp_ne : strictFPAlt<fcmp_ne_node,
599+
IRInt<"cmp_ne", [Predicate, Vector]>>;
600+
def fcmp_gt : strictFPAlt<fcmp_gt_node,
601+
IRInt<"cmp_gt", [Predicate, Vector]>>;
602+
def fcmp_ge : strictFPAlt<fcmp_ge_node,
603+
IRInt<"cmp_ge", [Predicate, Vector]>>;
604+
def fcmp_ult : strictFPAlt<fcmp_ult_node,
605+
IRInt<"cmp_lt", [Predicate, Vector]>>;
606+
def fcmp_ule : strictFPAlt<fcmp_ule_node,
607+
IRInt<"cmp_le", [Predicate, Vector]>>;
596608

597609
// -----------------------------------------------------------------------------
598610
// Convenience lists of parameter types. 'T' is just a container record, so you

0 commit comments

Comments
 (0)