File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -1524,8 +1524,16 @@ const llvm::fltSemantics &ASTContext::getFloatTypeSemantics(QualType T) const {
1524
1524
return Target->getHalfFormat ();
1525
1525
case BuiltinType::Float: return Target->getFloatFormat ();
1526
1526
case BuiltinType::Double: return Target->getDoubleFormat ();
1527
- case BuiltinType::LongDouble: return Target->getLongDoubleFormat ();
1528
- case BuiltinType::Float128: return Target->getFloat128Format ();
1527
+ case BuiltinType::LongDouble:
1528
+ if (getLangOpts ().OpenMP && getLangOpts ().OpenMPIsDevice &&
1529
+ &Target->getLongDoubleFormat () != &AuxTarget->getLongDoubleFormat ())
1530
+ return AuxTarget->getLongDoubleFormat ();
1531
+ return Target->getLongDoubleFormat ();
1532
+ case BuiltinType::Float128:
1533
+ if (getLangOpts ().OpenMP && getLangOpts ().OpenMPIsDevice &&
1534
+ &Target->getFloat128Format () != &AuxTarget->getFloat128Format ())
1535
+ return AuxTarget->getFloat128Format ();
1536
+ return Target->getFloat128Format ();
1529
1537
}
1530
1538
}
1531
1539
Original file line number Diff line number Diff line change 1
1
// RUN: %clang_cc1 -fopenmp -x c -triple i386-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm-bc %s -o %t-x86-host.bc
2
- // RUN: %clang_cc1 -verify -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized
3
- // RUN: %clang_cc1 -verify -DDIAGS -DIMMEDIATE -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized
4
- // RUN: %clang_cc1 -verify -DDIAGS -DDELAYED -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized
2
+ // RUN: %clang_cc1 -verify -fopenmp -x c -triple nvptx-unknown-unknown -aux-triple i386-unknown-unknown - fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized
3
+ // RUN: %clang_cc1 -verify -DDIAGS -DIMMEDIATE -fopenmp -x c -triple nvptx-unknown-unknown -aux-triple i386-unknown-unknown - fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized
4
+ // RUN: %clang_cc1 -verify -DDIAGS -DDELAYED -fopenmp -x c -triple nvptx-unknown-unknown -aux-triple i386-unknown-unknown - fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only -Wuninitialized
5
5
// REQUIRES: x86-registered-target
6
6
// REQUIRES: nvptx-registered-target
7
7
Original file line number Diff line number Diff line change 1
1
// Test target codegen - host bc file has to be created first.
2
2
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-linux -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-host.bc
3
- // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -aux-triple x86_64-unknown-linux -fopenmp-targets=nvptx64-nvidia-cuda -aux-triple x86_64-unknown-linux - emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-host.bc -o - | FileCheck %s
3
+ // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -aux-triple x86_64-unknown-linux -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-host.bc -o - | FileCheck %s
4
4
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-linux-gnu -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-host.bc
5
- // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -aux-triple powerpc64le-unknown-linux-gnu -fopenmp-targets=nvptx64-nvidia-cuda -aux-triple x86_64-unknown-linux - emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-host.bc -o - | FileCheck %s
5
+ // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -aux-triple powerpc64le-unknown-linux-gnu -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-host.bc -o - | FileCheck %s
6
6
// expected-no-diagnostics
7
7
8
- // CHECK-DAG: [[T:%.+]] = type {{.+}}, fp128,
8
+ // CHECK-DAG: [[T:%.+]] = type {{.+}}, {{ fp128|ppc_fp128}} ,
9
9
// CHECK-DAG: [[T1:%.+]] = type {{.+}}, i128, i128,
10
10
11
11
#ifndef _ARCH_PPC
@@ -78,4 +78,4 @@ BIGTYPE foo(BIGTYPE f) {
78
78
}
79
79
80
80
// CHECK: define weak void @__omp_offloading_{{.+}}foo{{.+}}_l75([[BIGTYPE:.+]]*
81
- // CHECK: store [[BIGTYPE]] 0xL00000000000000003FFF000000000000, [[BIGTYPE]]* %
81
+ // CHECK: store [[BIGTYPE]] {{ 0xL00000000000000003FFF000000000000|0xM3FF00000000000000000000000000000}} , [[BIGTYPE]]* %
You can’t perform that action at this time.
0 commit comments