summaryrefslogtreecommitdiffstats
path: root/test/CodeGenOpenCL
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-10-24 17:42:17 +0000
committerCraig Topper <craig.topper@intel.com>2018-10-24 17:42:17 +0000
commitc83cf570cd01a948fc0f209616379373f83043b9 (patch)
treed9abd68ab134c5ec6dcf5f640b6ba881030bb38a /test/CodeGenOpenCL
parent200207c0f1780bf30c7c532339507e501b8d595d (diff)
[CodeGen] Update min-legal-vector width based on function argument and return types
This is a continuation of my patches to inform the X86 backend about what the largest IR types are in the function so that we can restrict the backend type legalizer to prevent 512-bit vectors on SKX when -mprefer-vector-width=256 is specified if no explicit 512 bit vectors were specified by the user. This patch updates the vector width based on the argument and return types of the current function and from the types of any functions it calls. This is intended to make sure the backend type legalizer doesn't disturb any types that are required for ABI. Differential Revision: https://reviews.llvm.org/D52441 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenOpenCL')
-rw-r--r--test/CodeGenOpenCL/fpmath.cl12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/CodeGenOpenCL/fpmath.cl b/test/CodeGenOpenCL/fpmath.cl
index 8908861ace..0108d909c9 100644
--- a/test/CodeGenOpenCL/fpmath.cl
+++ b/test/CodeGenOpenCL/fpmath.cl
@@ -16,7 +16,7 @@ float spscalardiv(float a, float b) {
float4 spvectordiv(float4 a, float4 b) {
// CHECK: @spvectordiv
- // CHECK: #[[ATTR]]
+ // CHECK: #[[ATTR2:[0-9]+]]
// CHECK: fdiv{{.*}},
// NODIVOPT: !fpmath ![[MD]]
// DIVOPT-NOT: !fpmath ![[MD]]
@@ -45,7 +45,11 @@ double dpscalardiv(double a, double b) {
#endif
// CHECK: attributes #[[ATTR]] = {
-// NODIVOPT: "correctly-rounded-divide-sqrt-fp-math"="false"
-// DIVOPT: "correctly-rounded-divide-sqrt-fp-math"="true"
-// CHECK: }
+// NODIVOPT-SAME: "correctly-rounded-divide-sqrt-fp-math"="false"
+// DIVOPT-SAME: "correctly-rounded-divide-sqrt-fp-math"="true"
+// CHECK-SAME: }
+// CHECK: attributes #[[ATTR2]] = {
+// NODIVOPT-SAME: "correctly-rounded-divide-sqrt-fp-math"="false"
+// DIVOPT-SAME: "correctly-rounded-divide-sqrt-fp-math"="true"
+// CHECK-SAME: }
// NODIVOPT: ![[MD]] = !{float 2.500000e+00}