mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
Disallow some vector ops and fix integral vector identity comparisons
Bail out on unsupported vector ops (not checking the rhs type for binops though) in the frontend instead of causing LLVM errors. Also precompute the target's critical section size once at startup, like DMD.
This commit is contained in:
parent
8dd4f5f893
commit
a44c78fb88
6 changed files with 189 additions and 117 deletions
|
@ -384,7 +384,7 @@ LLValue *DtoBinFloatsEquals(Loc &loc, DValue *lhs, DValue *rhs, TOK op) {
|
|||
|
||||
LLValue *mergeVectorEquals(LLValue *resultsVector, TOK op) {
|
||||
// `resultsVector` is a vector of i1 values, the pair-wise results.
|
||||
// Bitcast to an integer and checks the bits via additional integer
|
||||
// Bitcast to an integer and check the bits via additional integer
|
||||
// comparison.
|
||||
const auto sizeInBits = getTypeBitSize(resultsVector->getType());
|
||||
LLType *integerType = LLType::getIntNTy(gIR->context(), sizeInBits);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue