Home | History | Annotate | Download | only in InstSimplify
      1 ; RUN: opt -S -instsimplify < %s | FileCheck %s
      2 %S = type { i16, i32 }
      3 
      4 define <2 x i16> @test1() {
      5 entry:
      6   %b = insertelement <2 x i16> <i16 undef, i16 0>, i16 extractvalue (%S select (i1 icmp eq (i16 extractelement (<2 x i16> bitcast (<1 x i32> <i32 1> to <2 x i16>), i32 0), i16 0), %S zeroinitializer, %S { i16 0, i32 1 }), 0), i32 0
      7   ret <2 x i16> %b
      8 }
      9 
     10 ; InstCombine will be able to fold this into zeroinitializer
     11 ; CHECK-LABEL: @test1(
     12 ; CHECK: ret <2 x i16> <i16 extractvalue (%S select (i1 icmp eq (i16 extractelement (<2 x i16> bitcast (<1 x i32> <i32 1> to <2 x i16>), i32 0), i16 0), %S zeroinitializer, %S { i16 0, i32 1 }), 0), i16 0>
     13