File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -725,9 +725,7 @@ bool Compiler<Emitter>::VisitParenExpr(const ParenExpr *E) {
725
725
template <class Emitter >
726
726
bool Compiler<Emitter>::VisitBinaryOperator(const BinaryOperator *BO) {
727
727
// Need short-circuiting for these.
728
- if (BO->getType ()->isVectorType ())
729
- return this ->VisitVectorBinOp (BO);
730
- if (BO->isLogicalOp ())
728
+ if (BO->isLogicalOp () && !BO->getType ()->isVectorType ())
731
729
return this ->VisitLogicalBinOp (BO);
732
730
733
731
const Expr *LHS = BO->getLHS ();
@@ -746,6 +744,8 @@ bool Compiler<Emitter>::VisitBinaryOperator(const BinaryOperator *BO) {
746
744
747
745
if (BO->getType ()->isAnyComplexType ())
748
746
return this ->VisitComplexBinOp (BO);
747
+ if (BO->getType ()->isVectorType ())
748
+ return this ->VisitVectorBinOp (BO);
749
749
if ((LHS->getType ()->isAnyComplexType () ||
750
750
RHS->getType ()->isAnyComplexType ()) &&
751
751
BO->isComparisonOp ())
@@ -1264,6 +1264,8 @@ bool Compiler<Emitter>::VisitComplexBinOp(const BinaryOperator *E) {
1264
1264
1265
1265
template <class Emitter >
1266
1266
bool Compiler<Emitter>::VisitVectorBinOp(const BinaryOperator *E) {
1267
+ assert (!E->isCommaOp () &&
1268
+ " Comma op should be handled in VisitBinaryOperator" );
1267
1269
assert (E->getType ()->isVectorType ());
1268
1270
assert (E->getLHS ()->getType ()->isVectorType ());
1269
1271
assert (E->getRHS ()->getType ()->isVectorType ());
Original file line number Diff line number Diff line change 1
1
// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -verify %s
2
+ // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -fsyntax-only -Wno-unused-value -verify %s
2
3
3
4
typedef __fp16 half4 __attribute__ ((vector_size (8 )));
4
5
typedef float float4 __attribute__ ((vector_size (16 )));
You can’t perform that action at this time.
0 commit comments