ldc/tests/codegen/gh3208.d
Martin Kinkelin fc28d2db91
Fix equality/identity comparisons of vectors with length >= 32 (#3209)
And downgrade the 2nd Travis Mac job to LLVM 7 to test all supported LLVM versions again.
2019-10-29 22:43:45 +01:00

20 lines
419 B
D

// older LLVM versions fail the test for longer vectors
// REQUIRES: atleast_llvm700
// RUN: %ldc -run %s
void test(int length)()
{
__vector(byte[length]) a = 123, b = a;
assert(a == b && !(a != b));
assert(a is b && !(a !is b));
b[0] = 0;
assert(a != b && !(a == b));
assert(a !is b && !(a is b));
}
void main()
{
static foreach (length; [16, 32, 64, 128, 256])
test!length();
}