1; Test that llvm-reduce can reduce floating point operands 2; 3; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=operands-one --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 4; RUN: FileCheck --check-prefixes=CHECK,ONE %s < %t 5 6; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=operands-zero --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 7; RUN: FileCheck --check-prefixes=CHECK,ZERO %s < %t 8 9; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 10; RUN: FileCheck --check-prefixes=CHECK,ZERO %s < %t 11 12; CHECK-INTERESTINGNESS: = add i32 % 13; CHECK-INTERESTINGNESS: = add i32 14; CHECK-INTERESTINGNESS: = add i32 15; CHECK-INTERESTINGNESS: = add i32 16; CHECK-INTERESTINGNESS: = add i32 17 18; CHECK-INTERESTINGNESS: = add <2 x i32> % 19; CHECK-INTERESTINGNESS: = add <2 x i32> 20; CHECK-INTERESTINGNESS: = add <2 x i32> 21; CHECK-INTERESTINGNESS: = add <2 x i32> 22; CHECK-INTERESTINGNESS: = add <2 x i32> 23; CHECK-INTERESTINGNESS: = add <2 x i32> 24 25; CHECK-LABEL: define void @foo( 26 27 28; ONE: %add0 = add i32 %arg0, 1 29; ONE: %add1 = add i32 1, 1 30; ONE: %add2 = add i32 1, 0 31; ONE: %add3 = add i32 1, 1 32; ONE: %add4 = add i32 1, 1 33; ONE: %add5 = add <2 x i32> %arg2, splat (i32 1) 34; ONE: %add6 = add <2 x i32> splat (i32 1), splat (i32 1) 35; ONE: %add7 = add <2 x i32> splat (i32 1), zeroinitializer 36; ONE: %add8 = add <2 x i32> splat (i32 1), splat (i32 1) 37; ONE: %add9 = add <2 x i32> splat (i32 1), splat (i32 1) 38; ONE: %add10 = add <2 x i32> splat (i32 1), splat (i32 1) 39 40 41; ZERO: %add0 = add i32 %arg0, 0 42; ZERO: %add1 = add i32 0, 0 43; ZERO: %add2 = add i32 0, 0 44; ZERO: %add3 = add i32 0, 0 45; ZERO: %add4 = add i32 0, 0 46; ZERO: %add5 = add <2 x i32> %arg2, zeroinitializer 47; ZERO: %add6 = add <2 x i32> zeroinitializer, zeroinitializer 48; ZERO: %add7 = add <2 x i32> zeroinitializer, zeroinitializer 49; ZERO: %add8 = add <2 x i32> zeroinitializer, zeroinitializer 50; ZERO: %add9 = add <2 x i32> zeroinitializer, zeroinitializer 51; ZERO: %add10 = add <2 x i32> zeroinitializer, zeroinitializer 52 53define void @foo(i32 %arg0, i32 %arg1, <2 x i32> %arg2, <2 x i32> %arg3) { 54bb0: 55 %add0 = add i32 %arg0, %arg1 56 %add1 = add i32 %arg0, %arg1 57 %add2 = add i32 %arg0, 0 58 %add3 = add i32 %arg0, 1 59 %add4 = add i32 %arg0, undef 60 %add5 = add <2 x i32> %arg2, %arg3 61 %add6 = add <2 x i32> %arg2, %arg3 62 %add7 = add <2 x i32> %arg2, zeroinitializer 63 %add8 = add <2 x i32> %arg2, <i32 1, i32 1> 64 %add9 = add <2 x i32> %arg2, undef 65 %add10 = add <2 x i32> %arg2, <i32 4, i32 6> 66 ret void 67} 68