brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · 5579754 Raw
93 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc < %s -mtriple=x86_64-- -mattr=+x87,-sse2,-sse | FileCheck %s --check-prefixes=X64,SDAG-X64-ISEL3; RUN: llc < %s -mtriple=x86_64-- -mattr=+x87,-sse2,-sse -fast-isel | FileCheck %s --check-prefixes=X64,FAST-X64-ISEL4; RUN: llc < %s -mtriple=x86_64-- -mattr=+x87,-sse2,-sse -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=X64,GISEL-X64-ISEL5; RUN: llc < %s -mtriple=i686-- -mattr=+x87,-sse2,-sse | FileCheck %s --check-prefixes=X86,SDAG-X86-ISEL6; RUN: llc < %s -mtriple=i686-- -mattr=+x87,-sse2,-sse -fast-isel | FileCheck %s --check-prefixes=X86,FAST-X86-ISEL7; RUN: llc < %s -mtriple=i686-- -mattr=+x87,-sse2,-sse -global-isel -global-isel-abort=0 | FileCheck %s --check-prefixes=X86,GISEL-X86-ISEL8 9define void @test_float_abs(ptr %argptr)   {10; SDAG-X64-ISEL-LABEL: test_float_abs:11; SDAG-X64-ISEL:       # %bb.0:12; SDAG-X64-ISEL-NEXT:    andb $127, 3(%rdi)13; SDAG-X64-ISEL-NEXT:    retq14;15; FAST-X64-ISEL-LABEL: test_float_abs:16; FAST-X64-ISEL:       # %bb.0:17; FAST-X64-ISEL-NEXT:    andb $127, 3(%rdi)18; FAST-X64-ISEL-NEXT:    retq19;20; GISEL-X64-ISEL-LABEL: test_float_abs:21; GISEL-X64-ISEL:       # %bb.0:22; GISEL-X64-ISEL-NEXT:    andl $2147483647, (%rdi) # imm = 0x7FFFFFFF23; GISEL-X64-ISEL-NEXT:    retq24;25; SDAG-X86-ISEL-LABEL: test_float_abs:26; SDAG-X86-ISEL:       # %bb.0:27; SDAG-X86-ISEL-NEXT:    movl {{[0-9]+}}(%esp), %eax28; SDAG-X86-ISEL-NEXT:    andb $127, 3(%eax)29; SDAG-X86-ISEL-NEXT:    retl30;31; FAST-X86-ISEL-LABEL: test_float_abs:32; FAST-X86-ISEL:       # %bb.0:33; FAST-X86-ISEL-NEXT:    movl {{[0-9]+}}(%esp), %eax34; FAST-X86-ISEL-NEXT:    andb $127, 3(%eax)35; FAST-X86-ISEL-NEXT:    retl36;37; GISEL-X86-ISEL-LABEL: test_float_abs:38; GISEL-X86-ISEL:       # %bb.0:39; GISEL-X86-ISEL-NEXT:    movl {{[0-9]+}}(%esp), %eax40; GISEL-X86-ISEL-NEXT:    andl $2147483647, (%eax) # imm = 0x7FFFFFFF41; GISEL-X86-ISEL-NEXT:    retl42     %arg = load  float, float* %argptr43     %abs = tail call float @llvm.fabs.f32(float %arg)44     store float %abs, ptr %argptr45     ret void46 }47 48define void @test_double_abs(ptr %argptr)  {49; SDAG-X64-ISEL-LABEL: test_double_abs:50; SDAG-X64-ISEL:       # %bb.0:51; SDAG-X64-ISEL-NEXT:    andb $127, 7(%rdi)52; SDAG-X64-ISEL-NEXT:    retq53;54; FAST-X64-ISEL-LABEL: test_double_abs:55; FAST-X64-ISEL:       # %bb.0:56; FAST-X64-ISEL-NEXT:    andb $127, 7(%rdi)57; FAST-X64-ISEL-NEXT:    retq58;59; GISEL-X64-ISEL-LABEL: test_double_abs:60; GISEL-X64-ISEL:       # %bb.0:61; GISEL-X64-ISEL-NEXT:    movabsq $9223372036854775807, %rax # imm = 0x7FFFFFFFFFFFFFFF62; GISEL-X64-ISEL-NEXT:    andq %rax, (%rdi)63; GISEL-X64-ISEL-NEXT:    retq64;65; X86-LABEL: test_double_abs:66; X86:       # %bb.0:67; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax68; X86-NEXT:    fldl (%eax)69; X86-NEXT:    fabs70; X86-NEXT:    fstpl (%eax)71; X86-NEXT:    retl72    %arg = load double, double* %argptr73    %abs = tail call double @llvm.fabs.f64(double %arg)74    store double %abs, double* %argptr75    ret void76}77 78define x86_fp80 @test_x86_fp80_abs(x86_fp80 %arg) {79; X64-LABEL: test_x86_fp80_abs:80; X64:       # %bb.0:81; X64-NEXT:    fldt {{[0-9]+}}(%rsp)82; X64-NEXT:    fabs83; X64-NEXT:    retq84;85; X86-LABEL: test_x86_fp80_abs:86; X86:       # %bb.0:87; X86-NEXT:    fldt {{[0-9]+}}(%esp)88; X86-NEXT:    fabs89; X86-NEXT:    retl90  %abs = tail call x86_fp80 @llvm.fabs.f80(x86_fp80 %arg)91  ret x86_fp80 %abs92}93