diff --git a/llvm/test/Transforms/InstCombine/or.ll b/llvm/test/Transforms/InstCombine/or.ll index 98dcd2a50c00..779edd635287 100644 --- a/llvm/test/Transforms/InstCombine/or.ll +++ b/llvm/test/Transforms/InstCombine/or.ll @@ -445,6 +445,28 @@ define i32 @orsext_to_sel_swap(i32 %x, i1 %y) { ret i32 %or } +define <2 x i32> @orsext_to_sel_vec(<2 x i32> %x, <2 x i1> %y) { +; CHECK-LABEL: @orsext_to_sel_vec( +; CHECK-NEXT: [[SEXT:%.*]] = sext <2 x i1> %y to <2 x i32> +; CHECK-NEXT: [[OR:%.*]] = or <2 x i32> [[SEXT]], %x +; CHECK-NEXT: ret <2 x i32> [[OR]] +; + %sext = sext <2 x i1> %y to <2 x i32> + %or = or <2 x i32> %sext, %x + ret <2 x i32> %or +} + +define <2 x i132> @orsext_to_sel_vec_swap(<2 x i132> %x, <2 x i1> %y) { +; CHECK-LABEL: @orsext_to_sel_vec_swap( +; CHECK-NEXT: [[SEXT:%.*]] = sext <2 x i1> %y to <2 x i132> +; CHECK-NEXT: [[OR:%.*]] = or <2 x i132> [[SEXT]], %x +; CHECK-NEXT: ret <2 x i132> [[OR]] +; + %sext = sext <2 x i1> %y to <2 x i132> + %or = or <2 x i132> %x, %sext + ret <2 x i132> %or +} + define i32 @test39(i32 %a, i32 %b) { ; CHECK-LABEL: @test39( ; CHECK-NEXT: [[OR:%.*]] = or i32 %a, %b