brintos

brintos / llvm-project-archived public Read only

0
0
Text · 564 B · 6fc2fb1 Raw
14 lines · plain
1; RUN: opt -passes=instcombine -S < %s | FileCheck %s2 3; We shouldn't fold bitcast(insert <vscale x 1 x iX> .., iX %val, i32 0)4; into bitcast(iX %val) for scalable vectors.5define <vscale x 2 x i8> @bitcast_of_insert_i8_i16(i16 %val) #0 {6; CHECK-LABEL: @bitcast_of_insert_i8_i16(7; CHECK-NOT:   bitcast i16 %val to <vscale x 2 x i8>8; CHECK:       bitcast <vscale x 1 x i16> %op2 to <vscale x 2 x i8>9entry:10  %op2 = insertelement <vscale x 1 x i16> undef, i16 %val, i32 011  %0 = bitcast <vscale x 1 x i16> %op2 to <vscale x 2 x i8>12  ret <vscale x 2 x i8> %013}14