1 ; RUN: llvm-dis < %s.bc| FileCheck %s 2 3 ; BinaryFloatOperation.3.2.ll.bc was generated by passing this file to llvm-as-3.2. 4 ; The test checks that LLVM does not misread binary float instructions from 5 ; older bitcode files. 6 7 define void @fadd(float %x1, double %x2 ,half %x3, fp128 %x4, x86_fp80 %x5, ppc_fp128 %x6){ 8 entry: 9 ; CHECK: %res1 = fadd float %x1, %x1 10 %res1 = fadd float %x1, %x1 11 12 ; CHECK-NEXT: %res2 = fadd double %x2, %x2 13 %res2 = fadd double %x2, %x2 14 15 ; CHECK-NEXT: %res3 = fadd half %x3, %x3 16 %res3 = fadd half %x3, %x3 17 18 ; CHECK-NEXT: %res4 = fadd fp128 %x4, %x4 19 %res4 = fadd fp128 %x4, %x4 20 21 ; CHECK-NEXT: %res5 = fadd x86_fp80 %x5, %x5 22 %res5 = fadd x86_fp80 %x5, %x5 23 24 ; CHECK-NEXT: %res6 = fadd ppc_fp128 %x6, %x6 25 %res6 = fadd ppc_fp128 %x6, %x6 26 27 ret void 28 } 29 30 define void @faddFloatVec(<2 x float> %x1, <3 x float> %x2 ,<4 x float> %x3, <8 x float> %x4, <16 x float> %x5){ 31 entry: 32 ; CHECK: %res1 = fadd <2 x float> %x1, %x1 33 %res1 = fadd <2 x float> %x1, %x1 34 35 ; CHECK-NEXT: %res2 = fadd <3 x float> %x2, %x2 36 %res2 = fadd <3 x float> %x2, %x2 37 38 ; CHECK-NEXT: %res3 = fadd <4 x float> %x3, %x3 39 %res3 = fadd <4 x float> %x3, %x3 40 41 ; CHECK-NEXT: %res4 = fadd <8 x float> %x4, %x4 42 %res4 = fadd <8 x float> %x4, %x4 43 44 ; CHECK-NEXT: %res5 = fadd <16 x float> %x5, %x5 45 %res5 = fadd <16 x float> %x5, %x5 46 47 ret void 48 } 49 50 define void @faddDoubleVec(<2 x double> %x1, <3 x double> %x2 ,<4 x double> %x3, <8 x double> %x4, <16 x double> %x5){ 51 entry: 52 ; CHECK: %res1 = fadd <2 x double> %x1, %x1 53 %res1 = fadd <2 x double> %x1, %x1 54 55 ; CHECK-NEXT: %res2 = fadd <3 x double> %x2, %x2 56 %res2 = fadd <3 x double> %x2, %x2 57 58 ; CHECK-NEXT: %res3 = fadd <4 x double> %x3, %x3 59 %res3 = fadd <4 x double> %x3, %x3 60 61 ; CHECK-NEXT: %res4 = fadd <8 x double> %x4, %x4 62 %res4 = fadd <8 x double> %x4, %x4 63 64 ; CHECK-NEXT: %res5 = fadd <16 x double> %x5, %x5 65 %res5 = fadd <16 x double> %x5, %x5 66 67 ret void 68 } 69 70 define void @faddHalfVec(<2 x half> %x1, <3 x half> %x2 ,<4 x half> %x3, <8 x half> %x4, <16 x half> %x5){ 71 entry: 72 ; CHECK: %res1 = fadd <2 x half> %x1, %x1 73 %res1 = fadd <2 x half> %x1, %x1 74 75 ; CHECK-NEXT: %res2 = fadd <3 x half> %x2, %x2 76 %res2 = fadd <3 x half> %x2, %x2 77 78 ; CHECK-NEXT: %res3 = fadd <4 x half> %x3, %x3 79 %res3 = fadd <4 x half> %x3, %x3 80 81 ; CHECK-NEXT: %res4 = fadd <8 x half> %x4, %x4 82 %res4 = fadd <8 x half> %x4, %x4 83 84 ; CHECK-NEXT: %res5 = fadd <16 x half> %x5, %x5 85 %res5 = fadd <16 x half> %x5, %x5 86 87 ret void 88 } 89 90 define void @fsub(float %x1){ 91 entry: 92 ; CHECK: %res1 = fsub float %x1, %x1 93 %res1 = fsub float %x1, %x1 94 95 ret void 96 } 97 98 define void @fmul(float %x1){ 99 entry: 100 ; CHECK: %res1 = fmul float %x1, %x1 101 %res1 = fmul float %x1, %x1 102 103 ret void 104 } 105 106 define void @fdiv(float %x1){ 107 entry: 108 ; CHECK: %res1 = fdiv float %x1, %x1 109 %res1 = fdiv float %x1, %x1 110 111 ret void 112 } 113 114 define void @frem(float %x1){ 115 entry: 116 ; CHECK: %res1 = frem float %x1, %x1 117 %res1 = frem float %x1, %x1 118 119 ret void 120 } 121