Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions dmd2/expression.c
Original file line number Diff line number Diff line change
Expand Up @@ -6422,8 +6422,13 @@ Expression *BinAssignExp::semantic(Scope *sc)
}

// vectors
#if IN_LLVM
if (shift && (e1->type->toBasetype()->ty != Tvector &&
e2->type->toBasetype()->ty == Tvector))
#else
if (shift && (e1->type->toBasetype()->ty == Tvector ||
e2->type->toBasetype()->ty == Tvector))
#endif
return incompatibleTypes();

int isvector = type->toBasetype()->ty == Tvector;
Expand Down Expand Up @@ -11797,8 +11802,13 @@ Expression *ShlExp::semantic(Scope *sc)
return e;
e1 = e1->checkIntegral();
e2 = e2->checkIntegral();
#if IN_LLVM
if (e1->type->toBasetype()->ty != Tvector &&
e2->type->toBasetype()->ty == Tvector)
#else
if (e1->type->toBasetype()->ty == Tvector ||
e2->type->toBasetype()->ty == Tvector)
#endif
return incompatibleTypes();
e1 = e1->integralPromotions(sc);
#if IN_LLVM
Expand Down Expand Up @@ -11828,8 +11838,13 @@ Expression *ShrExp::semantic(Scope *sc)
return e;
e1 = e1->checkIntegral();
e2 = e2->checkIntegral();
#if IN_LLVM
if (e1->type->toBasetype()->ty != Tvector &&
e2->type->toBasetype()->ty == Tvector)
#else
if (e1->type->toBasetype()->ty == Tvector ||
e2->type->toBasetype()->ty == Tvector)
#endif
return incompatibleTypes();
e1 = e1->integralPromotions(sc);
#if IN_LLVM
Expand Down Expand Up @@ -11859,8 +11874,13 @@ Expression *UshrExp::semantic(Scope *sc)
return e;
e1 = e1->checkIntegral();
e2 = e2->checkIntegral();
#if IN_LLVM
if (e1->type->toBasetype()->ty != Tvector &&
e2->type->toBasetype()->ty == Tvector)
#else
if (e1->type->toBasetype()->ty == Tvector ||
e2->type->toBasetype()->ty == Tvector)
#endif
return incompatibleTypes();
e1 = e1->integralPromotions(sc);
#if IN_LLVM
Expand Down