diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3070,7 +3070,8 @@ llvm::Triple TT(A->getValue(i)); if (TT.getArch() == llvm::Triple::UnknownArch || - !(TT.getArch() == llvm::Triple::ppc || + !(TT.getArch() == llvm::Triple::aarch64 || + TT.getArch() == llvm::Triple::ppc || TT.getArch() == llvm::Triple::ppc64 || TT.getArch() == llvm::Triple::ppc64le || TT.getArch() == llvm::Triple::nvptx || diff --git a/clang/test/OpenMP/openmp_offload_registration.cpp b/clang/test/OpenMP/openmp_offload_registration.cpp --- a/clang/test/OpenMP/openmp_offload_registration.cpp +++ b/clang/test/OpenMP/openmp_offload_registration.cpp @@ -1,5 +1,6 @@ -// Test for offload registration code for two targets +// Test offload registration for two targets, and test offload target validation. // RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=x86_64-pc-linux-gnu,powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=aarch64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics void foo() {