[clang] [CIR] Support x86 builtin rdtsc (PR #180714)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 10 16:50:13 PST 2026


================
@@ -0,0 +1,46 @@
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -fclangir -emit-cir -o %t.cir %s
+// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
+
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -fclangir -emit-llvm -o %t.ll %s
+// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
+
+// RUN: %clang_cc1 -x c -ffreestanding -triple=x86_64-unknown-linux -emit-llvm -o - %s | FileCheck %s -check-prefix=OGCG
----------------
andykaylor wrote:

```suggestion
// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -fclangir -emit-llvm -o %t-cir.ll %s
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s

// RUN: %clang_cc1 -x c -ffreestanding -triple=x86_64-unknown-linux -emit-llvm -o %t.ll %s
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
```

https://github.com/llvm/llvm-project/pull/180714


More information about the cfe-commits mailing list