+ | VICMP IPredicates Types ValueRef ',' ValueRef {
+ if (!UpRefs.empty())
+ GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
+ if (!isa<VectorType>((*$3).get()))
+ GEN_ERROR("Scalar types not supported by vicmp instruction");
+ Value* tmpVal1 = getVal(*$3, $4);
+ CHECK_FOR_ERROR
+ Value* tmpVal2 = getVal(*$3, $6);
+ CHECK_FOR_ERROR
+ $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2);
+ if ($$ == 0)
+ GEN_ERROR("icmp operator returned null");
+ delete $3;
+ }
+ | VFCMP FPredicates Types ValueRef ',' ValueRef {
+ if (!UpRefs.empty())
+ GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
+ if (!isa<VectorType>((*$3).get()))
+ GEN_ERROR("Scalar types not supported by vfcmp instruction");
+ Value* tmpVal1 = getVal(*$3, $4);
+ CHECK_FOR_ERROR
+ Value* tmpVal2 = getVal(*$3, $6);
+ CHECK_FOR_ERROR
+ $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2);
+ if ($$ == 0)
+ GEN_ERROR("fcmp operator returned null");
+ delete $3;
+ }