Skip to content

Commit bb31225

Browse files
committed
Only test shifts if the CPU has the AVX2 instruction set.
1 parent 47bd012 commit bb31225

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

test/miscellaneous.jl

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -637,16 +637,19 @@
637637
@test s s1
638638
@test p p1
639639
end
640-
n = 511
641-
for T [Int16, Int32, Int64]
642-
643-
out1 = rand(T(1):T(1_000), n);
644-
out2 = copy(out1);
645-
rshift_i!(out1)
646-
rshift_i_avx!(out2)
647-
@test out1 == out2
648-
one_plus_i!(out1)
649-
one_plus_i_avx!(out2)
650-
@test out1 == out2
640+
if LoopVectorization.VectorizationBase.AVX2
641+
# Travis CI fails in this case. I do not have personal access to such a machine
642+
# making it hard to debug.
643+
n = 511
644+
for T [Int16, Int32, Int64]
645+
out1 = rand(T(1):T(1_000), n);
646+
out2 = copy(out1);
647+
rshift_i!(out1)
648+
rshift_i_avx!(out2)
649+
@test out1 == out2
650+
one_plus_i!(out1)
651+
one_plus_i_avx!(out2)
652+
@test out1 == out2
653+
end
651654
end
652655
end

0 commit comments

Comments
 (0)