brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.2 KiB · f03a6c0 Raw
130 lines · plain
1; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr7 \2; RUN:     -mattr=+altivec  -vec-extabi -xcoff-traceback-table=true < %s | \3; RUN:   FileCheck --check-prefixes=CHECK-ASM,COMMON %s4 5; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -function-sections \6; RUN:     -mcpu=pwr7 -mattr=+altivec -vec-extabi < %s | \7; RUN:   FileCheck --check-prefixes=CHECK-FUNC,COMMON %s8 9;; #include <altivec.h>10;; vector float f(vector int vi1, int i1, int i2, float f1, vector float vf,double d1, vector char vc1) {11;;   return vec_abs(vf);12;; }13;; vector float fin(int x) {14;;  vector float vf ={1.0,1.0,1.0,1.0};15;;  if (x) return vf;16;;  return vec_abs(vf);17;; }18 19define dso_local <4 x float> @f(<4 x i32> %vi1, i32 signext %i1, i32 signext %i2, float %f1, <4 x float> %vf, double %d1, <16 x i8> %vc1) #0 {20entry:21  %__a.addr.i = alloca <4 x float>, align 1622  %vi1.addr = alloca <4 x i32>, align 1623  %i1.addr = alloca i32, align 424  %i2.addr = alloca i32, align 425  %f1.addr = alloca float, align 426  %vf.addr = alloca <4 x float>, align 1627  %d1.addr = alloca double, align 828  %vc1.addr = alloca <16 x i8>, align 1629  store <4 x i32> %vi1, ptr %vi1.addr, align 1630  store i32 %i1, ptr %i1.addr, align 431  store i32 %i2, ptr %i2.addr, align 432  store float %f1, ptr %f1.addr, align 433  store <4 x float> %vf, ptr %vf.addr, align 1634  store double %d1, ptr %d1.addr, align 835  store <16 x i8> %vc1, ptr %vc1.addr, align 1636  %0 = load <4 x float>, ptr %vf.addr, align 1637  store <4 x float> %0, ptr %__a.addr.i, align 1638  %1 = load <4 x float>, ptr %__a.addr.i, align 1639  %2 = load <4 x float>, ptr %__a.addr.i, align 1640  %3 = call <4 x float> @llvm.fabs.v4f32(<4 x float> %2) #241  ret <4 x float> %342}43 44define <4 x float> @fin(i32 %x) #0 {45entry:46  %__a.addr.i = alloca <4 x float>, align 1647  %__res.i = alloca <4 x i32>, align 1648  %retval = alloca <4 x float>, align 1649  %x.addr = alloca i32, align 450  %vf = alloca <4 x float>, align 1651  store i32 %x, ptr %x.addr, align 452  store <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, ptr %vf, align 1653  %0 = load i32, ptr %x.addr, align 454  %tobool = icmp ne i32 %0, 055  br i1 %tobool, label %if.then, label %if.end56 57if.then:                                          ; preds = %entry58  %1 = load <4 x float>, ptr %vf, align 1659  store <4 x float> %1, ptr %retval, align 1660  br label %return61 62if.end:                                           ; preds = %entry63  %2 = load <4 x float>, ptr %vf, align 1664  store <4 x float> %2, ptr %__a.addr.i, align 1665  %3 = load <4 x float>, ptr %__a.addr.i, align 1666  %4 = bitcast <4 x float> %3 to <4 x i32>67  %and.i = and <4 x i32> %4, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647>68  store <4 x i32> %and.i, ptr %__res.i, align 1669  %5 = load <4 x i32>, ptr %__res.i, align 1670  %6 = bitcast <4 x i32> %5 to <4 x float>71  store <4 x float> %6, ptr %retval, align 1672  br label %return73 74return:                                           ; preds = %if.end, %if.then75  %7 = load <4 x float>, ptr %retval, align 1676  ret <4 x float> %777}78 79declare <4 x float> @llvm.fabs.v4f32(<4 x float>) #180 81; COMMON:      L..f0:82; COMMON-NEXT:  .vbyte  4, 0x00000000                   # Traceback table begin83; COMMON-NEXT:  .byte   0x00                            # Version = 084; COMMON-NEXT:  .byte   0x09                            # Language = CPlusPlus85; COMMON-NEXT:  .byte   0x22                            # -IsGlobalLinkage, -IsOutOfLineEpilogOrPrologue86; COMMON-NEXT:                                         # +HasTraceBackTableOffset, -IsInternalProcedure87; COMMON-NEXT:                                         # -HasControlledStorage, -IsTOCless88; COMMON-NEXT:                                         # +IsFloatingPointPresent89; COMMON-NEXT:                                         # -IsFloatingPointOperationLogOrAbortEnabled90; COMMON-NEXT:  .byte   0x40                            # -IsInterruptHandler, +IsFunctionNamePresent, -IsAllocaUsed91; COMMON-NEXT:                                         # OnConditionDirective = 0, -IsCRSaved, -IsLRSaved92; COMMON-NEXT:  .byte   0x00                            # -IsBackChainStored, -IsFixup, NumOfFPRsSaved = 093; COMMON-NEXT:  .byte   0x40                            # -HasExtensionTable, +HasVectorInfo, NumOfGPRsSaved = 094; COMMON-NEXT:  .byte   0x02                            # NumberOfFixedParms = 295; COMMON-NEXT:  .byte   0x05                            # NumberOfFPParms = 2, +HasParmsOnStack96; COMMON-NEXT:  .vbyte  4, 0x42740000                   # Parameter type = v, i, i, f, v, d, v97; CHECK-ASM-NEXT:  .vbyte  4, L..f0-.f                     # Function size98; CHECK-FUNC-NEXT: .vbyte  4, L..f0-.f[PR]                 # Function size99; COMMON-NEXT:  .vbyte  2, 0x0001                       # Function name len = 1100; COMMON-NEXT:  .byte   102                             # Function Name101; COMMON-NEXT:  .byte   0x00                            # NumOfVRsSaved = 0, -IsVRSavedOnStack, -HasVarArgs102; COMMON-NEXT:  .byte   0x07                            # NumOfVectorParams = 3, +HasVMXInstruction103; COMMON-NEXT:  .vbyte  4, 0xb0000000                   # Vector Parameter type = vi, vf, vc104; COMMON-NEXT:  .vbyte  2, 0x0000                       # Padding 105 106; COMMON:     L..fin0:107; COMMON-NEXT:  .vbyte  4, 0x00000000                   # Traceback table begin108; COMMON-NEXT:  .byte   0x00                            # Version = 0109; COMMON-NEXT:  .byte   0x09                            # Language = CPlusPlus110; COMMON-NEXT:  .byte   0x22                            # -IsGlobalLinkage, -IsOutOfLineEpilogOrPrologue111; COMMON-NEXT:                                         # +HasTraceBackTableOffset, -IsInternalProcedure112; COMMON-NEXT:                                         # -HasControlledStorage, -IsTOCless113; COMMON-NEXT:                                         # +IsFloatingPointPresent114; COMMON-NEXT:                                         # -IsFloatingPointOperationLogOrAbortEnabled115; COMMON-NEXT:  .byte   0x40                            # -IsInterruptHandler, +IsFunctionNamePresent, -IsAllocaUsed116; COMMON-NEXT:                                         # OnConditionDirective = 0, -IsCRSaved, -IsLRSaved117; COMMON-NEXT:  .byte   0x00                            # -IsBackChainStored, -IsFixup, NumOfFPRsSaved = 0118; COMMON-NEXT:  .byte   0x40                            # -HasExtensionTable, +HasVectorInfo, NumOfGPRsSaved = 0119; COMMON-NEXT:  .byte   0x01                            # NumberOfFixedParms = 1120; COMMON-NEXT:  .byte   0x01                            # NumberOfFPParms = 0, +HasParmsOnStack121; COMMON-NEXT:  .vbyte  4, 0x00000000                   # Parameter type = i122; CHECK-ASM-NEXT:       .vbyte  4, L..fin0-.fin                 # Function size123; CHECK-FUNC-NEXT:      .vbyte  4, L..fin0-.fin[PR]             # Function size124; COMMON-NEXT:  .vbyte  2, 0x0003                       # Function name len = 3125; COMMON-NEXT:  .byte   "fin"                           # Function Name 126; COMMON-NEXT:  .byte   0x00                            # NumOfVRsSaved = 0, -IsVRSavedOnStack, -HasVarArgs127; COMMON-NEXT:  .byte   0x01                            # NumOfVectorParams = 0, +HasVMXInstruction128; COMMON-NEXT:  .vbyte  4, 0x00000000                   # Vector Parameter type =129; COMMON-NEXT:  .vbyte  2, 0x0000                       # Padding130