1 ; RUN: opt < %s -reassociate -S | FileCheck %s
3 ; Don't handle floating point vector operations.
4 define <4 x float> @test1() {
6 ; CHECK-NEXT: %tmp1 = fsub fast <4 x float> zeroinitializer, zeroinitializer
7 ; CHECK-NEXT: %tmp2 = fmul fast <4 x float> zeroinitializer, %tmp1
9 %tmp1 = fsub fast <4 x float> zeroinitializer, zeroinitializer
10 %tmp2 = fmul fast <4 x float> zeroinitializer, %tmp1
14 ; We don't currently commute integer vector operations.
15 define <2 x i32> @test2(<2 x i32> %x, <2 x i32> %y) {
17 ; CHECK-NEXT: %tmp1 = add <2 x i32> %x, %y
18 ; CHECK-NEXT: %tmp2 = add <2 x i32> %y, %x
19 ; CHECK-NEXT: %tmp3 = add <2 x i32> %tmp1, %tmp2
21 %tmp1 = add <2 x i32> %x, %y
22 %tmp2 = add <2 x i32> %y, %x
23 %tmp3 = add <2 x i32> %tmp1, %tmp2