[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 10 11:49:41 PDT 2025
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>,
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= <burhan.sogutt at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/157333 at github.com>
================
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -fclangir -emit-cir -pic-is-pie -pic-level 1 %s -o %t1.cir
+// RUN: FileCheck --input-file=%t1.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -fclangir -emit-llvm -pic-is-pie -pic-level 1 %s -o %t.ll
+// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
----------------
andykaylor wrote:
```suggestion
// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -fclangir -emit-llvm -pic-is-pie -pic-level 1 %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple aarch64-none-linux-android21 -emit-llvm -pic-is-pie -pic-level 1 %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
```
This is the kind of change I was suggesting for tests that have LLVM IR checks. You would also need to add OGCG checks, which should be very close to the existing LLVM checks. The point is to find differences between the LLVM IR generated when we go through CIR compared to the LLVM IR generated when we are not using CIR.
As I mentioned before, it's probably best to remove tests that need this kind of update and make that a follow-up PR.
https://github.com/llvm/llvm-project/pull/157333
More information about the cfe-commits
mailing list