From a9f48803d795bd8cb0ca13d97e6b868358260fc7 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 11 Nov 2017 21:44:48 +0000 Subject: [PATCH] [X86] Add avx512f command line to rounding-ops.ll llvm-svn: 317988 --- llvm/test/CodeGen/X86/rounding-ops.ll | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/llvm/test/CodeGen/X86/rounding-ops.ll b/llvm/test/CodeGen/X86/rounding-ops.ll index b920be4..eec1941 100644 --- a/llvm/test/CodeGen/X86/rounding-ops.ll +++ b/llvm/test/CodeGen/X86/rounding-ops.ll @@ -1,6 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+sse4.1 | FileCheck -check-prefix=CHECK-SSE %s ; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+avx | FileCheck -check-prefix=CHECK-AVX %s +; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+avx512f | FileCheck -check-prefix=CHECK-AVX512 %s define float @test1(float %x) nounwind { ; CHECK-SSE-LABEL: test1: @@ -12,6 +13,11 @@ define float @test1(float %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundss $9, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test1: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscaless $9, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call float @floorf(float %x) nounwind readnone ret float %call } @@ -28,6 +34,11 @@ define double @test2(double %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundsd $9, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test2: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscalesd $9, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call double @floor(double %x) nounwind readnone ret double %call } @@ -44,6 +55,11 @@ define float @test3(float %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundss $12, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test3: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscaless $12, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call float @nearbyintf(float %x) nounwind readnone ret float %call } @@ -60,6 +76,11 @@ define double @test4(double %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundsd $12, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test4: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscalesd $12, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call double @nearbyint(double %x) nounwind readnone ret double %call } @@ -76,6 +97,11 @@ define float @test5(float %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundss $10, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test5: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscaless $10, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call float @ceilf(float %x) nounwind readnone ret float %call } @@ -92,6 +118,11 @@ define double @test6(double %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundsd $10, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test6: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscalesd $10, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call double @ceil(double %x) nounwind readnone ret double %call } @@ -108,6 +139,11 @@ define float @test7(float %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundss $4, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test7: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscaless $4, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call float @rintf(float %x) nounwind readnone ret float %call } @@ -124,6 +160,11 @@ define double @test8(double %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundsd $4, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test8: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscalesd $4, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call double @rint(double %x) nounwind readnone ret double %call } @@ -140,6 +181,11 @@ define float @test9(float %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundss $11, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test9: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscaless $11, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call float @truncf(float %x) nounwind readnone ret float %call } @@ -156,6 +202,11 @@ define double @test10(double %x) nounwind { ; CHECK-AVX: ## BB#0: ; CHECK-AVX-NEXT: vroundsd $11, %xmm0, %xmm0, %xmm0 ; CHECK-AVX-NEXT: retq +; +; CHECK-AVX512-LABEL: test10: +; CHECK-AVX512: ## BB#0: +; CHECK-AVX512-NEXT: vrndscalesd $11, %xmm0, %xmm0, %xmm0 +; CHECK-AVX512-NEXT: retq %call = tail call double @trunc(double %x) nounwind readnone ret double %call } -- 2.7.4