xref: /llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/trunc_vec.ll (revision b280ee1dd7e9b36ae7aaa3953556e4b7a7f31a29)
1*b280ee1dSBjorn Pettersson; RUN: opt -passes=instsimplify < %s
2486ed885SArthur Eubanks
3486ed885SArthur Eubanks; Make sure we don't crash on this one
4486ed885SArthur Eubanks
5486ed885SArthur Eubanksdefine <8 x i8> @test_truc_vec() {
6486ed885SArthur Eubanks  %x = bitcast <2 x i64> <i64 1, i64 2> to <8 x i16>
7486ed885SArthur Eubanks  %y = trunc <8 x i16> %x to <8 x i8>
8486ed885SArthur Eubanks  ret <8 x i8> %y
9486ed885SArthur Eubanks}
10