[clang] [CIR] Enable x86_64 calling-convention lowering by default (PR #215026)
Adam Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 10 16:55:16 PDT 2026
https://github.com/adams381 updated https://github.com/llvm/llvm-project/pull/215026
>From b78563861f13ea16d2cffe717cf2719a42296515 Mon Sep 17 00:00:00 2001
From: Adam Smith <adams at nvidia.com>
Date: Sat, 8 Aug 2026 09:33:46 -0700
Subject: [PATCH 1/5] [CIR] Enable x86_64 calling-convention lowering by
default
x86_64 calling-convention lowering has been opt-in behind
`-clangir-enable-call-conv-lowering` since it landed, so nothing reaches the
pass unless a test asks for it. The ClangIR default path therefore emits
high-level signatures that do not match SysV: a 32-byte struct return stays
first-class instead of going out through `sret`, and a one-eightbyte struct
argument is passed as a record instead of being coerced to `i64`.
This change turns the pass on by default for x86_64 and adds
`-clangir-disable-call-conv-lowering` to turn it back off. The last flag on the
command line wins, so a build can disable the pass globally and re-enable it for
one translation unit.
Flipping the default breaks 147 of 949 CIR tests. 37 tests are CHECK
regenerations where lowering moved toward classic CodeGen. 110 tests are
quarantined by adding the disable flag to the RUN lines that turn the ClangIR
pipeline on, each with a TODO naming the gate that blocks it. These are the
known failures at this time:
- 41 vector types
- 30 parameters of an empty or tag class
- 10 the builtin `i32` in the Itanium EH personality signature
- 8 padded, packed, and over-aligned records
- 7 the `!cir.long_double` wrapper with f16 and f128
- 6 `_Complex`
- 3 `_BitInt` wider than 128 bits
- 5 more naming two gates at once.
Assisted-by: Cursor / claude-opus-5
---
clang/docs/CIR/ABILowering.rst | 14 ++++
.../include/clang/Frontend/FrontendOptions.h | 7 +-
clang/include/clang/Options/Options.td | 15 +++-
clang/lib/CIR/FrontendAction/CIRGenAction.cpp | 3 +-
clang/test/CIR/CodeGen/arg-attrs.cpp | 9 +-
clang/test/CIR/CodeGen/array-ctor.cpp | 8 +-
.../CIR/CodeGen/array-init-loop-exprs.cpp | 4 +-
clang/test/CIR/CodeGen/atomic.c | 11 ++-
clang/test/CIR/CodeGen/attr-noundef.cpp | 6 +-
.../CIR/CodeGen/bind-temporary-lvalue.cpp | 13 +--
clang/test/CIR/CodeGen/bitfields.cpp | 6 +-
.../CIR/CodeGen/bitint-split-storage-nyi.c | 10 ++-
clang/test/CIR/CodeGen/bitint.c | 6 +-
.../CIR/CodeGen/builtin-atomic-is-lock-free.c | 14 ++--
clang/test/CIR/CodeGen/builtins-x86.c | 6 +-
.../CIR/CodeGen/call-conv-lowering-flag.c | 28 +++++++
clang/test/CIR/CodeGen/call.c | 74 +++++++++++++----
clang/test/CIR/CodeGen/call.cpp | 46 ++++++++--
clang/test/CIR/CodeGen/cast.c | 29 +++++--
clang/test/CIR/CodeGen/catch-in-loop.cpp | 6 +-
.../cleanup-conditional-with-wrapper-eh.cpp | 6 +-
.../cleanup-conditional-with-wrapper.cpp | 6 +-
.../test/CIR/CodeGen/cleanup-conditional.cpp | 6 +-
.../CodeGen/cleanup-derived-to-base-ref.cpp | 6 +-
.../CIR/CodeGen/cleanup-scope-goto-out.cpp | 8 +-
.../CIR/CodeGen/cleanup-scope-goto-within.cpp | 4 +-
.../CodeGen/cleanup-scope-throw-caught.cpp | 6 +-
clang/test/CIR/CodeGen/cleanup.cpp | 4 +-
clang/test/CIR/CodeGen/complex-cast.cpp | 8 +-
clang/test/CIR/CodeGen/complex.cpp | 6 +-
.../CIR/CodeGen/convert-incomplete-type.cpp | 9 +-
clang/test/CIR/CodeGen/ctor-try-body.cpp | 6 +-
.../CodeGen/cxx-rewritten-binary-operator.cpp | 6 +-
.../CodeGen/cxx23-explicit-object-member.cpp | 6 +-
.../CodeGen/cxx2b-static-call-operator.cpp | 6 +-
.../CIR/CodeGen/default-func-attrs-invoke.cpp | 6 +-
clang/test/CIR/CodeGen/delete-destroying.cpp | 6 +-
clang/test/CIR/CodeGen/dtors.cpp | 6 +-
clang/test/CIR/CodeGen/enum-bool.cpp | 37 +++------
clang/test/CIR/CodeGen/forrange.cpp | 4 +-
.../test/CIR/CodeGen/global-decomp-decls.cpp | 20 +++--
clang/test/CIR/CodeGen/if.cpp | 4 +-
clang/test/CIR/CodeGen/instantiate-init.cpp | 19 ++++-
clang/test/CIR/CodeGen/invoke-attrs.cpp | 6 +-
clang/test/CIR/CodeGen/label.c | 10 +--
clang/test/CIR/CodeGen/lambda-dtor-field.cpp | 27 +++---
.../lambda-static-invoker-agg-return.cpp | 22 ++---
clang/test/CIR/CodeGen/lambda.cpp | 62 +++++++++-----
.../test/CIR/CodeGen/long-double-inc-dec.cpp | 14 ++--
clang/test/CIR/CodeGen/loop-cond-cleanup.cpp | 6 +-
.../CIR/CodeGen/loop-cond-var-cleanup.cpp | 6 +-
clang/test/CIR/CodeGen/mem-expr-fn.cpp | 6 +-
.../CIR/CodeGen/new-delete-deactivation.cpp | 11 ++-
clang/test/CIR/CodeGen/new-null.cpp | 6 +-
clang/test/CIR/CodeGen/nofpclass.c | 6 +-
.../CIR/CodeGen/non-odr-use-const-bool.cpp | 6 +-
.../CIR/CodeGen/non-scalar-lval-return.cpp | 32 +++++--
clang/test/CIR/CodeGen/nrvo.cpp | 8 +-
clang/test/CIR/CodeGen/pack-indexing.cpp | 6 +-
.../test/CIR/CodeGen/paren-list-agg-init.cpp | 6 +-
.../CIR/CodeGen/partial-array-cleanup.cpp | 6 +-
.../CodeGen/pointer-to-member-func-cast.cpp | 83 ++++++++++---------
.../CodeGen/pointer-to-member-func-cmp.cpp | 36 +++++---
.../test/CIR/CodeGen/record-type-metadata.cpp | 5 +-
clang/test/CIR/CodeGen/ret-attrs.cpp | 8 +-
clang/test/CIR/CodeGen/struct.cpp | 15 +++-
.../test/CIR/CodeGen/temp-param-obj-decl.cpp | 10 ++-
clang/test/CIR/CodeGen/ternary-throw.cpp | 8 +-
clang/test/CIR/CodeGen/three-way-cmp.cpp | 8 +-
clang/test/CIR/CodeGen/thunks.cpp | 21 ++---
clang/test/CIR/CodeGen/trivial-abi.cpp | 6 +-
.../CodeGen/try-catch-all-with-cleanup.cpp | 6 +-
.../CodeGen/try-catch-non-trivial-copy.cpp | 6 +-
clang/test/CIR/CodeGen/try-catch.cpp | 6 +-
.../CIR/CodeGen/try-no-throwing-calls.cpp | 6 +-
clang/test/CIR/CodeGen/unary.cpp | 6 +-
clang/test/CIR/CodeGen/union-agg-init.c | 23 +++--
clang/test/CIR/CodeGen/union-agg-init.cpp | 29 +++++--
clang/test/CIR/CodeGen/union.c | 6 +-
clang/test/CIR/CodeGen/union.cpp | 21 ++---
clang/test/CIR/CodeGen/var-arg-aggregate.c | 6 +-
.../CIR/CodeGen/vector-binop-overflow.cpp | 6 +-
.../test/CIR/CodeGen/vector-convert-to-bool.c | 6 +-
clang/test/CIR/CodeGen/vector-ext.cpp | 6 +-
clang/test/CIR/CodeGen/vector.cpp | 6 +-
.../test/CIR/CodeGen/virtual-fn-calls-eh.cpp | 2 +-
.../CIR/CodeGen/virtual-function-calls.cpp | 2 +-
.../vtable-linkage-explicit-instantiation.cpp | 6 +-
.../vtable-nyi-nonconvertible-functype.cpp | 6 +-
.../CIR/CodeGenBuiltins/X86/align-builtins.c | 10 ++-
.../CIR/CodeGenBuiltins/X86/avx-builtins.c | 18 ++--
.../X86/avx-shuffle-builtins.c | 10 ++-
.../X86/avx10_2_512bf16-builtins.c | 6 +-
.../X86/avx10_2bf16-builtins.c | 6 +-
.../CIR/CodeGenBuiltins/X86/avx2-builtins.c | 18 ++--
.../CodeGenBuiltins/X86/avx512-reduceIntrin.c | 6 +-
.../X86/avx512-reduceMinMaxIntrin.c | 6 +-
.../X86/avx512-select-builtins.c | 6 +-
.../CodeGenBuiltins/X86/avx512bw-builtins.c | 10 ++-
.../CodeGenBuiltins/X86/avx512dq-builtins.c | 10 ++-
.../CodeGenBuiltins/X86/avx512f-builtins.c | 10 ++-
.../CodeGenBuiltins/X86/avx512f16c-builtins.c | 6 +-
.../CodeGenBuiltins/X86/avx512fp16-builtins.c | 6 +-
.../X86/avx512vbmi2-builtins.c | 6 +-
.../CodeGenBuiltins/X86/avx512vl-builtins.c | 6 +-
.../X86/avx512vlbf16-builtins.c | 6 +-
.../CodeGenBuiltins/X86/avx512vlbw-builtins.c | 10 ++-
.../CodeGenBuiltins/X86/avx512vldq-builtins.c | 6 +-
.../X86/avx512vlfp16-builtins.c | 6 +-
.../X86/avx512vlvbmi2-builtins.c | 10 ++-
.../X86/avx512vlvp2intersect-builtins.c | 10 ++-
.../X86/avx512vp2intersect-builtins.c | 10 ++-
.../CIR/CodeGenBuiltins/X86/cmp-builtins.c | 10 ++-
.../test/CIR/CodeGenBuiltins/X86/keylocker.c | 10 ++-
.../CIR/CodeGenBuiltins/X86/permd-builtins.c | 10 ++-
.../CIR/CodeGenBuiltins/X86/sqrt-builtins.c | 6 +-
.../CIR/CodeGenBuiltins/X86/sse-builtins.c | 10 ++-
.../CIR/CodeGenBuiltins/X86/sse2-builtins.c | 10 ++-
.../CIR/CodeGenBuiltins/X86/sse41-builtins.c | 18 ++--
.../CIR/CodeGenBuiltins/X86/ssse3-builtins.c | 6 +-
.../CodeGenBuiltins/X86/vec-set-builtins.c | 10 ++-
.../CIR/CodeGenBuiltins/X86/xop-builtins.c | 18 ++--
.../test/CIR/CodeGenBuiltins/builtin-bit.cpp | 6 +-
.../test/CIR/CodeGenBuiltins/builtin-call.cpp | 6 +-
.../CIR/CodeGenBuiltins/builtin-constant-p.c | 5 +-
.../CIR/CodeGenBuiltins/builtin-fcmp-sse.c | 6 +-
.../test/CIR/CodeGenBuiltins/builtin-float.c | 6 +-
.../CIR/CodeGenBuiltins/builtin-isfpclass.c | 6 +-
.../CodeGenBuiltins/builtin-reduce-bitwise.c | 6 +-
.../CodeGenBuiltins/builtin-undef-rvalue.cpp | 6 +-
.../builtins-elementwise-bool-nyi.c | 4 +-
.../CodeGenBuiltins/builtins-floating-point.c | 8 +-
clang/test/CIR/CodeGenCUDA/device-stub.cu | 4 +-
clang/test/CIR/CodeGenCUDA/kernel-call.cu | 9 +-
.../CIR/CodeGenCXX/typeid-most-derived.cpp | 6 +-
clang/test/CIR/CodeGenCXX/typeid.cpp | 6 +-
clang/test/CIR/CodeGenCXX/uncopyable-args.cpp | 6 +-
.../test/CIR/CodeGenCXX/x86_64-arguments.cpp | 7 +-
.../CIR/CodeGenCoroutines/coro-exceptions.cpp | 5 +-
.../test/CIR/CodeGenCoroutines/coro-task.cpp | 4 +-
.../CIR/CodeGenOpenACC/atomic-capture.cpp | 4 +-
.../test/CIR/CodeGenOpenACC/atomic-update.cpp | 4 +-
.../test/CIR/CodeGenOpenACC/atomic-write.cpp | 4 +-
.../test/CIR/CodeGenOpenACC/declare-copy.cpp | 4 +-
.../CIR/CodeGenOpenACC/declare-copyin.cpp | 4 +-
.../CIR/CodeGenOpenACC/declare-copyout.cpp | 4 +-
.../CIR/CodeGenOpenACC/declare-create.cpp | 4 +-
.../CodeGenOpenACC/declare-deviceresident.cpp | 4 +-
.../CIR/CodeGenOpenACC/declare-present.cpp | 6 +-
.../test/CIR/CodeGenOpenACC/routine-bind.cpp | 4 +-
.../test/CIR/CodeGenSYCL/kernel-call-stmt.cpp | 6 +-
clang/test/CIR/func-simple.cpp | 2 +-
152 files changed, 1018 insertions(+), 555 deletions(-)
create mode 100644 clang/test/CIR/CodeGen/call-conv-lowering-flag.c
diff --git a/clang/docs/CIR/ABILowering.rst b/clang/docs/CIR/ABILowering.rst
index 1b788cade4dc3..287fdd69c80ee 100644
--- a/clang/docs/CIR/ABILowering.rst
+++ b/clang/docs/CIR/ABILowering.rst
@@ -568,6 +568,20 @@ The pass takes one of two driver modes via pass options:
Exactly one of the two options must be set.
+Enabling the Pass
+-----------------
+
+``cir-call-conv-lowering`` runs by default whenever ClangIR code generation is
+enabled on an x86_64 target. On every other triple the pipeline omits the
+pass, because x86_64 System V is the only classifier implemented so far, and
+signatures reach the LLVM dialect in their high-level form.
+
+``-clangir-disable-call-conv-lowering`` turns the pass off and
+``-clangir-enable-call-conv-lowering`` turns it back on. The last one on the
+command line wins, so a build can disable the pass globally and re-enable it
+for a single translation unit. Both are ``-cc1`` options, so reach them from
+the driver through ``-Xclang``.
+
Open Questions
==============
diff --git a/clang/include/clang/Frontend/FrontendOptions.h b/clang/include/clang/Frontend/FrontendOptions.h
index 3d410c0d7deef..b85cf4c007862 100644
--- a/clang/include/clang/Frontend/FrontendOptions.h
+++ b/clang/include/clang/Frontend/FrontendOptions.h
@@ -423,9 +423,10 @@ class FrontendOptions {
LLVM_PREFERRED_TYPE(bool)
unsigned ClangIREnableIdiomRecognizer : 1;
- /// Enable Clang IR (CIR) calling-convention lowering
+ /// Run the Clang IR (CIR) calling-convention lowering pass. A no-op on
+ /// targets whose calling convention is not yet implemented.
LLVM_PREFERRED_TYPE(bool)
- unsigned ClangIREnableCallConvLowering : 1;
+ unsigned ClangIRCallConvLowering : 1;
/// Enable ClangIR library optimization.
/// Set when -fclangir-lib-opt or -fclangir-lib-opt= was passed.
@@ -569,7 +570,7 @@ class FrontendOptions {
EmitPrettySymbolGraphs(false), GenReducedBMI(false),
UseClangIRPipeline(false), ClangIRDisablePasses(false),
ClangIRDisableCIRVerifier(false), ClangIREnableIdiomRecognizer(false),
- ClangIREnableCallConvLowering(false), ClangIRLibOptEnabled(false),
+ ClangIRCallConvLowering(true), ClangIRLibOptEnabled(false),
TimeTraceGranularity(500), TimeTraceVerbose(false) {}
/// getInputKindForExtension - Return the appropriate input kind for a file
diff --git a/clang/include/clang/Options/Options.td b/clang/include/clang/Options/Options.td
index cf66ee3e52f2d..4c5aaa6fa052a 100644
--- a/clang/include/clang/Options/Options.td
+++ b/clang/include/clang/Options/Options.td
@@ -3467,10 +3467,21 @@ def clangir_enable_idiom_recognizer : Flag<["-"], "clangir-enable-idiom-recogniz
HelpText<"ClangIR: Enable Idiom Recognizer pass">,
MarshallingInfoFlag<FrontendOpts<"ClangIREnableIdiomRecognizer">>;
+// The enable/disable pair below is spelled out rather than generated by
+// BoolOption, which can only generate an X / no-X pair.
def clangir_enable_call_conv_lowering : Flag<["-"], "clangir-enable-call-conv-lowering">,
Visibility<[ClangOption, CC1Option]>,
- HelpText<"ClangIR: Enable calling-convention lowering pass (x86_64 only)">,
- MarshallingInfoFlag<FrontendOpts<"ClangIREnableCallConvLowering">>;
+ HelpText<"ClangIR: Enable calling-convention lowering pass (x86_64 only, on "
+ "by default)">,
+ MarshallingInfoBooleanFlag<FrontendOpts<"ClangIRCallConvLowering">, "true",
+ "true", "false",
+ "clangir_disable_call_conv_lowering">;
+def clangir_disable_call_conv_lowering : Flag<["-"], "clangir-disable-call-conv-lowering">,
+ Visibility<[ClangOption, CC1Option]>,
+ HelpText<"ClangIR: Disable calling-convention lowering pass (x86_64 only)">,
+ MarshallingInfoBooleanFlag<FrontendOpts<"ClangIRCallConvLowering">, "true",
+ "false", "true",
+ "clangir_enable_call_conv_lowering">;
def clangir_lib_opt_EQ : Joined<["-"], "clangir-lib-opt=">,
Visibility<[ClangOption, CC1Option]>, Group<f_Group>, Values<"all">,
diff --git a/clang/lib/CIR/FrontendAction/CIRGenAction.cpp b/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
index 42baa948d9698..f679724583cde 100644
--- a/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
+++ b/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
@@ -144,8 +144,7 @@ class CIRGenConsumer : public clang::ASTConsumer {
if (runCIRToCIRPasses(
MlirModule, MlirCtx, C, !FEOptions.ClangIRDisableCIRVerifier,
FEOptions.ClangIREnableIdiomRecognizer, CGO.OptimizationLevel > 0,
- EnableLibOpt, LibOptOptions,
- FEOptions.ClangIREnableCallConvLowering)
+ EnableLibOpt, LibOptOptions, FEOptions.ClangIRCallConvLowering)
.failed()) {
CI.getDiagnostics().Report(diag::err_cir_to_cir_transform_failed);
return;
diff --git a/clang/test/CIR/CodeGen/arg-attrs.cpp b/clang/test/CIR/CodeGen/arg-attrs.cpp
index 6856cb13659e4..5a6987a4c3484 100644
--- a/clang/test/CIR/CodeGen/arg-attrs.cpp
+++ b/clang/test/CIR/CodeGen/arg-attrs.cpp
@@ -18,8 +18,9 @@ void Struct::this_func(){}
// CIR: cir.func {{.*}}@_ZN6Struct9this_funcEv(%{{.*}}: !cir.ptr<!rec_Struct> {llvm.align = 4 : i64, llvm.dereferenceable = 20 : i64, llvm.nonnull, llvm.noundef} {{.*}}) {{.*}} {
// BOTH: define {{.*}}void @_ZN6Struct9this_funcEv(ptr noundef nonnull align 4 dereferenceable(20) %{{.*}})
void Struct::arg_attr(Struct s, int &i, Incomplete &j){}
- // CIR: cir.func {{.*}}@_ZN6Struct8arg_attrES_RiR10Incomplete(%{{.*}}: !cir.ptr<!rec_Struct> {llvm.align = 4 : i64, llvm.dereferenceable = 20 : i64, llvm.nonnull, llvm.noundef} {{.*}}, %{{.*}}: !rec_Struct {{.*}}, %{{.*}}: !cir.ptr<!s32i> {llvm.align = 4 : i64, llvm.dereferenceable = 4 : i64, llvm.nonnull, llvm.noundef} {{.*}}, %arg3: !cir.ptr<!rec_Incomplete> {llvm.align = 1 : i64, llvm.nonnull, llvm.noundef} {{.*}}) {{.*}} {
- // LLVM: define {{.*}}void @_ZN6Struct8arg_attrES_RiR10Incomplete(ptr noundef nonnull align 4 dereferenceable(20) %{{.*}}, %struct.Struct %{{.*}}, ptr noundef nonnull align 4 dereferenceable(4) %{{.*}}, ptr noundef nonnull align 1 %{{.*}})
+ // CIR: cir.func {{.*}}@_ZN6Struct8arg_attrES_RiR10Incomplete(%{{[^,)]+}}: !cir.ptr<!rec_Struct> {llvm.align = 4 : i64, llvm.dereferenceable = 20 : i64, llvm.nonnull, llvm.noundef} {{.*}}, %{{[^,)]+}}: !cir.ptr<!rec_Struct> {llvm.align = 8 : i64, llvm.byval = !rec_Struct, llvm.noalias, llvm.noundef} {{.*}}, %{{[^,)]+}}: !cir.ptr<!s32i> {llvm.align = 4 : i64, llvm.dereferenceable = 4 : i64, llvm.nonnull, llvm.noundef} {{.*}}, %arg3: !cir.ptr<!rec_Incomplete> {llvm.align = 1 : i64, llvm.nonnull, llvm.noundef} {{.*}}) {{.*}} {
+ // TODO(cir): CIR adds noalias to a byval argument where classic does not.
+ // LLVM: define {{.*}}void @_ZN6Struct8arg_attrES_RiR10Incomplete(ptr noundef nonnull align 4 dereferenceable(20) %{{[^,)]+}}, ptr noalias noundef byval(%struct.Struct) align 8 %{{[^,)]+}}, ptr noundef nonnull align 4 dereferenceable(4) %{{[^,)]+}}, ptr noundef nonnull align 1 %{{[^,)]+}})
// OGCG: define {{.*}}void @_ZN6Struct8arg_attrES_RiR10Incomplete(ptr noundef nonnull align 4 dereferenceable(20) %{{.*}}, ptr noundef byval(%struct.Struct) align 8 %{{.*}}, ptr noundef nonnull align 4 dereferenceable(4) %{{.*}}, ptr noundef nonnull align 1 %{{.*}})
struct __attribute__((aligned(32))) Aligned32 {
@@ -51,8 +52,8 @@ void caller(Struct s, int i, Incomplete &inc) {
// CIR: cir.call @_ZN6Struct9this_funcEv(%{{.*}}) : (!cir.ptr<!rec_Struct> {llvm.align = 4 : i64, llvm.dereferenceable = 20 : i64, llvm.nonnull, llvm.noundef})
// BOTH: call void @_ZN6Struct9this_funcEv(ptr noundef nonnull align 4 dereferenceable(20) %{{.*}})
s.arg_attr(s, i, inc);
- // CIR: cir.call @_ZN6Struct8arg_attrES_RiR10Incomplete(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) : (!cir.ptr<!rec_Struct> {llvm.align = 4 : i64, llvm.dereferenceable = 20 : i64, llvm.nonnull, llvm.noundef}, !rec_Struct, !cir.ptr<!s32i> {llvm.align = 4 : i64, llvm.dereferenceable = 4 : i64, llvm.nonnull, llvm.noundef}, !cir.ptr<!rec_Incomplete> {llvm.align = 1 : i64, llvm.nonnull, llvm.noundef})
- // LLVM: call void @_ZN6Struct8arg_attrES_RiR10Incomplete(ptr noundef nonnull align 4 dereferenceable(20) %{{.*}}, %struct.Struct %{{.*}}, ptr noundef nonnull align 4 dereferenceable(4) %{{.*}}, ptr noundef nonnull align 1 %{{.*}})
+ // CIR: cir.call @_ZN6Struct8arg_attrES_RiR10Incomplete(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) : (!cir.ptr<!rec_Struct> {llvm.align = 4 : i64, llvm.dereferenceable = 20 : i64, llvm.nonnull, llvm.noundef}, !cir.ptr<!rec_Struct> {llvm.align = 8 : i64, llvm.byval = !rec_Struct, llvm.noalias, llvm.noundef}, !cir.ptr<!s32i> {llvm.align = 4 : i64, llvm.dereferenceable = 4 : i64, llvm.nonnull, llvm.noundef}, !cir.ptr<!rec_Incomplete> {llvm.align = 1 : i64, llvm.nonnull, llvm.noundef})
+ // LLVM: call void @_ZN6Struct8arg_attrES_RiR10Incomplete(ptr noundef nonnull align 4 dereferenceable(20) %{{.*}}, ptr noalias noundef byval(%struct.Struct) align 8 %{{.*}}, ptr noundef nonnull align 4 dereferenceable(4) %{{.*}}, ptr noundef nonnull align 1 %{{.*}})
// OGCG: call void @_ZN6Struct8arg_attrES_RiR10Incomplete(ptr noundef nonnull align 4 dereferenceable(20) %{{.*}}, ptr noundef byval(%struct.Struct) align 8 %{{.*}}, ptr noundef nonnull align 4 dereferenceable(4) %{{.*}}, ptr noundef nonnull align 1 %{{.*}})
}
diff --git a/clang/test/CIR/CodeGen/array-ctor.cpp b/clang/test/CIR/CodeGen/array-ctor.cpp
index 3d94a36a60d70..b661f78157c76 100644
--- a/clang/test/CIR/CodeGen/array-ctor.cpp
+++ b/clang/test/CIR/CodeGen/array-ctor.cpp
@@ -1,7 +1,9 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o - 2>&1 | FileCheck --check-prefixes=CIR-BEFORE-LPP %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o - 2>&1 | FileCheck --check-prefixes=CIR-BEFORE-LPP %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/array-init-loop-exprs.cpp b/clang/test/CIR/CodeGen/array-init-loop-exprs.cpp
index 25ffaca4a6807..b1a9c54147a31 100644
--- a/clang/test/CIR/CodeGen/array-init-loop-exprs.cpp
+++ b/clang/test/CIR/CodeGen/array-init-loop-exprs.cpp
@@ -87,10 +87,10 @@ struct HasNonTrivialArray {
// LLVM-LABEL: define {{.*}}@_ZN18HasNonTrivialArrayC1ERKS_(
// LLVM: call void @_ZN18HasNonTrivialArrayC2ERKS_(
-// LLVM-LABEL: define dso_local %struct.HasNonTrivialArray @make_copy(
+// LLVM-LABEL: define dso_local void @make_copy(ptr dead_on_unwind noalias writable sret(%struct.HasNonTrivialArray) align 4 %{{[^,)]+}}, ptr noundef nonnull align 4 dereferenceable(12) %{{[^,)]+}})
// LLVM: call void @_ZN18HasNonTrivialArrayC1ERKS_(
-// OGCG-LABEL: define {{.*}}@make_copy(
+// OGCG-LABEL: define dso_local void @make_copy(ptr dead_on_unwind noalias writable sret(%struct.HasNonTrivialArray) align 4 %{{[^,)]+}}, ptr noundef nonnull align 4 dereferenceable(12) %{{[^,)]+}})
// OGCG: call void @_ZN18HasNonTrivialArrayC1ERKS_(
//
// OGCG-LABEL: define {{.*}}@_ZN18HasNonTrivialArrayC1ERKS_(
diff --git a/clang/test/CIR/CodeGen/atomic.c b/clang/test/CIR/CodeGen/atomic.c
index d6b93c387f2bd..a8a7779e83256 100644
--- a/clang/test/CIR/CodeGen/atomic.c
+++ b/clang/test/CIR/CodeGen/atomic.c
@@ -3744,8 +3744,8 @@ typedef struct S {
void store_atomic_different_size(S a) {
// CIR-LABEL: @store_atomic_different_size
- // LLVM-LABEL: @store_atomic_different_size
- // OGCG-LABEL: @store_atomic_different_size
+ // LLVM-LABEL: define dso_local void @store_atomic_different_size(i24 %{{[^,)]+}})
+ // OGCG-LABEL: define dso_local void @store_atomic_different_size(i24 %{{[^,)]+}})
_Atomic(S) b;
__c11_atomic_store(&b, a, __ATOMIC_SEQ_CST);
@@ -3770,12 +3770,15 @@ void store_atomic_different_size(S a) {
// FIXME(cir): The difference below is due to ABI lowering not being fully implemented for CIR.
+ // LLVM: %[[COERCE:.*]] = alloca i24, i64 1, align 4
+ // LLVM: store i24 %{{.+}}, ptr %[[COERCE]], align 4
+ // LLVM: %[[A:.*]] = load %struct.S, ptr %[[COERCE]], align 1
// LLVM: %[[A_ADDR:.*]] = alloca %struct.S, i64 1, align 1
// LLVM: %[[B_ADDR:.*]] = alloca { %struct.S, [1 x i8] }, i64 1, align 4
// LLVM: %[[A_ATOMIC_TMP_ADDR:.*]] = alloca %struct.S, i64 1, align 1
// LLVM: %[[ATOMIC_TMP_ADDR:.*]] = alloca { %struct.S, [1 x i8] }, i64 1, align 4
- // LLVM: store %struct.S %[[A:.*]], ptr %[[A_ADDR]], align 1
- // LLVM: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %4, ptr align 1 %[[A_ADDR]], i64 3, i1 false)
+ // LLVM: store %struct.S %[[A]], ptr %[[A_ADDR]], align 1
+ // LLVM: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %[[A_ATOMIC_TMP_ADDR]], ptr align 1 %[[A_ADDR]], i64 3, i1 false)
// LLVM: call void @llvm.memset.p0.i64(ptr align 1 %[[A_ATOMIC_TMP_ADDR]], i8 0, i64 4, i1 false)
// LLVM: call void @llvm.memcpy.p0.p0.i64(ptr %[[ATOMIC_TMP_ADDR]], ptr %[[A_ATOMIC_TMP_ADDR]], i64 3, i1 false)
// LLVM: %[[ATOMIC_TMP:.*]] = load i32, ptr %[[ATOMIC_TMP_ADDR]], align 4
diff --git a/clang/test/CIR/CodeGen/attr-noundef.cpp b/clang/test/CIR/CodeGen/attr-noundef.cpp
index 390559b4f8ae9..9052c9dea11a0 100644
--- a/clang/test/CIR/CodeGen/attr-noundef.cpp
+++ b/clang/test/CIR/CodeGen/attr-noundef.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/bind-temporary-lvalue.cpp b/clang/test/CIR/CodeGen/bind-temporary-lvalue.cpp
index 53c6de30397b4..44893f3f9cab0 100644
--- a/clang/test/CIR/CodeGen/bind-temporary-lvalue.cpp
+++ b/clang/test/CIR/CodeGen/bind-temporary-lvalue.cpp
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 -std=c++03 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
// RUN: %clang_cc1 -std=c++03 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
-// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefixes=LLVM,LLVMCIR
+// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -std=c++03 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
-// RUN: FileCheck --input-file=%t.ll %s --check-prefixes=LLVM,OGCG
+// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
struct S {
~S();
@@ -17,8 +17,7 @@ int f() { return getS().x; }
// CIR: cir.func {{.*}}@_Z1fv()
// CIR: %[[RET:.*]] = cir.alloca "__retval"
// CIR: %[[TMP:.*]] = cir.alloca "temp.lvalue"
-// CIR: %[[CALL:.*]] = cir.call @_Z4getSv() : () -> !rec_S
-// CIR: cir.store{{.*}} %[[CALL]], %[[TMP]]
+// CIR: cir.call @_Z4getSv(%[[TMP]]) : (!cir.ptr<!rec_S> {llvm.align = 4 : i64, llvm.dead_on_unwind, llvm.sret = !rec_S, llvm.writable}) -> ()
// CIR: cir.cleanup.scope {
// CIR: %[[X:.*]] = cir.get_member %[[TMP]][0] {name = "x"} : !cir.ptr<!rec_S> -> !cir.ptr<!s32i>
// CIR: %[[VAL:.*]] = cir.load{{.*}} %[[X]] : !cir.ptr<!s32i>, !s32i
@@ -29,13 +28,9 @@ int f() { return getS().x; }
// CIR: %[[RES:.*]] = cir.load %[[RET]] : !cir.ptr<!s32i>, !s32i
// CIR: cir.return %[[RES]]
-// FIXME(cir): The difference below is due to ABI lowering not being implemented for CIR.
-
// LLVM: define {{.*}}@_Z1fv()
// LLVM: %[[TMP:.*]] = alloca %struct.S
-// LLVMCIR: %[[CALL:.*]] = call %struct.S @_Z4getSv()
-// LLVMCIR: store %struct.S %[[CALL]], ptr %[[TMP]]
-// OGCG: call void @_Z4getSv(ptr {{.*}} sret(%struct.S) {{.*}} %[[TMP]])
+// LLVM: call void @_Z4getSv(ptr dead_on_unwind writable sret(%struct.S) align 4 %[[TMP]])
// LLVM: %[[X:.*]] = getelementptr inbounds {{.*}} %struct.S, ptr %[[TMP]], i32 0, i32 0
// LLVM: %[[VAL:.*]] = load i32, ptr %[[X]]
// LLVM: call void @_ZN1SD1Ev(ptr {{.*}} %[[TMP]])
diff --git a/clang/test/CIR/CodeGen/bitfields.cpp b/clang/test/CIR/CodeGen/bitfields.cpp
index 2117d2848a531..53b1ed85a662a 100644
--- a/clang/test/CIR/CodeGen/bitfields.cpp
+++ b/clang/test/CIR/CodeGen/bitfields.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports padded, packed, and over-aligned record shapes.
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/bitint-split-storage-nyi.c b/clang/test/CIR/CodeGen/bitint-split-storage-nyi.c
index ee9fc168124e6..786617ff02975 100644
--- a/clang/test/CIR/CodeGen/bitint-split-storage-nyi.c
+++ b/clang/test/CIR/CodeGen/bitint-split-storage-nyi.c
@@ -1,7 +1,9 @@
-// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -DGLOBAL %s -o - 2>&1 | FileCheck %s --check-prefix=GLOBAL
-// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -DALLOCA %s -o - 2>&1 | FileCheck %s --check-prefix=ALLOCA
-// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -DSTORE %s -o - 2>&1 | FileCheck %s --check-prefix=STORE
-// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -DLOAD %s -o - 2>&1 | FileCheck %s --check-prefix=LOAD
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _BitInt wider than 128 bits.
+// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -DGLOBAL %s -o - 2>&1 | FileCheck %s --check-prefix=GLOBAL
+// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -DALLOCA %s -o - 2>&1 | FileCheck %s --check-prefix=ALLOCA
+// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -DSTORE %s -o - 2>&1 | FileCheck %s --check-prefix=STORE
+// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -DLOAD %s -o - 2>&1 | FileCheck %s --check-prefix=LOAD
#ifdef GLOBAL
signed _BitInt(129) g129 = 1;
diff --git a/clang/test/CIR/CodeGen/bitint.c b/clang/test/CIR/CodeGen/bitint.c
index ef67366571138..0a1fa721c0778 100644
--- a/clang/test/CIR/CodeGen/bitint.c
+++ b/clang/test/CIR/CodeGen/bitint.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _BitInt wider than 128 bits.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/builtin-atomic-is-lock-free.c b/clang/test/CIR/CodeGen/builtin-atomic-is-lock-free.c
index 2792f595275a6..b2681ef35ce4b 100644
--- a/clang/test/CIR/CodeGen/builtin-atomic-is-lock-free.c
+++ b/clang/test/CIR/CodeGen/builtin-atomic-is-lock-free.c
@@ -15,32 +15,32 @@ int test_atomic_var(unsigned long n, void *p) {
return __atomic_is_lock_free(n, p);
}
-// CIR-DAG: cir.func private dso_local @__atomic_is_lock_free(!u64i, !cir.ptr<!void>) -> !cir.bool
+// CIR-DAG: cir.func private dso_local @__atomic_is_lock_free(!u64i, !cir.ptr<!void>) -> (!cir.bool {llvm.zeroext})
// CIR-LABEL: cir.func{{.*}} @test_atomic(
// CIR: %[[SZ:.*]] = cir.const #cir.int<24> : !u64i
// CIR: %[[P:.*]] = cir.load{{.*}} : !cir.ptr<!cir.ptr<!rec_Big>>, !cir.ptr<!rec_Big>
// CIR: %[[VP:.*]] = cir.cast bitcast %[[P]] : !cir.ptr<!rec_Big> -> !cir.ptr<!void>
-// CIR: cir.call @__atomic_is_lock_free(%[[SZ]], %[[VP]]) : (!u64i, !cir.ptr<!void>) -> !cir.bool
+// CIR: cir.call @__atomic_is_lock_free(%[[SZ]], %[[VP]]) : (!u64i, !cir.ptr<!void>) -> (!cir.bool {llvm.zeroext})
// CIR-LABEL: cir.func{{.*}} @test_c11(
// CIR: %[[SZ2:.*]] = cir.const #cir.int<24> : !u64i
// CIR: %[[NULL:.*]] = cir.const #cir.ptr<null> : !cir.ptr<!void>
-// CIR: cir.call @__atomic_is_lock_free(%[[SZ2]], %[[NULL]]) : (!u64i, !cir.ptr<!void>) -> !cir.bool
+// CIR: cir.call @__atomic_is_lock_free(%[[SZ2]], %[[NULL]]) : (!u64i, !cir.ptr<!void>) -> (!cir.bool {llvm.zeroext})
// CIR-LABEL: cir.func{{.*}} @test_atomic_var(
-// CIR: cir.call @__atomic_is_lock_free(%{{.*}}, %{{.*}}) : (!u64i, !cir.ptr<!void>) -> !cir.bool
+// CIR: cir.call @__atomic_is_lock_free(%{{.*}}, %{{.*}}) : (!u64i, !cir.ptr<!void>) -> (!cir.bool {llvm.zeroext})
// LLVM-LABEL: define dso_local i32 @test_atomic(
-// LLVMCIR: call i1 @__atomic_is_lock_free(i64 24, ptr %{{.*}})
+// LLVMCIR: call zeroext i1 @__atomic_is_lock_free(i64 24, ptr %{{.*}})
// OGCG: call zeroext i1 @__atomic_is_lock_free(i64 noundef 24, ptr noundef %{{.*}})
// LLVM: zext i1 %{{.*}} to i32
// LLVM-LABEL: define dso_local i32 @test_c11(
-// LLVMCIR: call i1 @__atomic_is_lock_free(i64 24, ptr null)
+// LLVMCIR: call zeroext i1 @__atomic_is_lock_free(i64 24, ptr null)
// OGCG: call zeroext i1 @__atomic_is_lock_free(i64 noundef 24, ptr noundef null)
// LLVM: zext i1 %{{.*}} to i32
// LLVM-LABEL: define dso_local i32 @test_atomic_var(
-// LLVMCIR: call i1 @__atomic_is_lock_free(i64 %{{.*}}, ptr %{{.*}})
+// LLVMCIR: call zeroext i1 @__atomic_is_lock_free(i64 %{{.*}}, ptr %{{.*}})
// OGCG: call zeroext i1 @__atomic_is_lock_free(i64 noundef %{{.*}}, ptr noundef %{{.*}})
diff --git a/clang/test/CIR/CodeGen/builtins-x86.c b/clang/test/CIR/CodeGen/builtins-x86.c
index 4f72a3000fc44..d97e41e972e66 100644
--- a/clang/test/CIR/CodeGen/builtins-x86.c
+++ b/clang/test/CIR/CodeGen/builtins-x86.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -fclangir -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -emit-llvm %s -o %t-ogcg.ll
// RUN: FileCheck --input-file=%t-ogcg.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/call-conv-lowering-flag.c b/clang/test/CIR/CodeGen/call-conv-lowering-flag.c
new file mode 100644
index 0000000000000..fd7e29deb7c08
--- /dev/null
+++ b/clang/test/CIR/CodeGen/call-conv-lowering-flag.c
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - \
+// RUN: | FileCheck %s --check-prefix=ON
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - \
+// RUN: -clangir-disable-call-conv-lowering \
+// RUN: | FileCheck %s --check-prefix=OFF
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - \
+// RUN: -clangir-enable-call-conv-lowering -clangir-disable-call-conv-lowering \
+// RUN: -clangir-enable-call-conv-lowering \
+// RUN: | FileCheck %s --check-prefix=ON
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - \
+// RUN: -clangir-disable-call-conv-lowering -clangir-enable-call-conv-lowering \
+// RUN: -clangir-disable-call-conv-lowering \
+// RUN: | FileCheck %s --check-prefix=OFF
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - \
+// RUN: | FileCheck %s --check-prefix=ON
+
+typedef struct { long a, b, c, d; } Big;
+
+// A 32-byte record returns through memory once the pass runs, and first-class
+// otherwise, so the signature alone says whether the pass ran. The ON
+// signature is also what classic CodeGen emits, which the last RUN line pins.
+Big ret_big(long a) {
+ Big b = {a, a, a, a};
+ return b;
+}
+
+// ON: define dso_local void @ret_big(ptr dead_on_unwind noalias writable sret(%struct.Big) align 8 %{{[^,)]+}}, i64 noundef %{{[^,)]+}})
+// OFF: define dso_local %struct.Big @ret_big(i64 noundef %{{[^,)]+}})
diff --git a/clang/test/CIR/CodeGen/call.c b/clang/test/CIR/CodeGen/call.c
index 7d5776922fb44..2c2bacd360643 100644
--- a/clang/test/CIR/CodeGen/call.c
+++ b/clang/test/CIR/CodeGen/call.c
@@ -16,13 +16,21 @@ void f2(void) {
f1(s);
}
+// S is one eightbyte of INTEGER class, so it is passed as one i64.
// CIR-LABEL: cir.func{{.*}} @f2(){{.*}} {
+// CIR: %[[COERCE:.+]] = cir.alloca "coerce" align(8) : !cir.ptr<!rec_S>
// CIR: %[[S:.+]] = cir.load align(4) %{{.+}} : !cir.ptr<!rec_S>, !rec_S
-// CIR-NEXT: cir.call @f1(%[[S]]) : (!rec_S) -> ()
+// CIR-NEXT: cir.store %[[S]], %[[COERCE]] : !rec_S, !cir.ptr<!rec_S>
+// CIR-NEXT: %[[CAST:.+]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_S> -> !cir.ptr<!u64i>
+// CIR-NEXT: %[[ARG:.+]] = cir.load %[[CAST]] : !cir.ptr<!u64i>, !u64i
+// CIR-NEXT: cir.call @f1(%[[ARG]]) : (!u64i) -> ()
// LLVM-LABEL: define{{.*}} void @f2(){{.*}}
+// LLVM: %[[COERCE:.+]] = alloca %struct.S, i64 1, align 8
// LLVM: %[[S:.+]] = load %struct.S, ptr %{{.+}}, align 4
-// LLVM-NEXT: call void @f1(%struct.S %[[S]])
+// LLVM-NEXT: store %struct.S %[[S]], ptr %[[COERCE]], align 4
+// LLVM-NEXT: %[[ARG:.+]] = load i64, ptr %[[COERCE]], align 8
+// LLVM-NEXT: call void @f1(i64 %[[ARG]])
// OGCG-LABEL: define{{.*}} void @f2()
// OGCG: %[[S:.+]] = load i64, ptr %{{.+}}, align 4
@@ -34,11 +42,18 @@ void f4(void) {
}
// CIR-LABEL: cir.func{{.*}} @f4(){{.*}} {
-// CIR: %[[S:.+]] = cir.call @f3() : () -> !rec_S
+// CIR: %[[COERCE:.+]] = cir.alloca "coerce" align(8) : !cir.ptr<!u64i>
+// CIR: %[[RET:.+]] = cir.call @f3() : () -> !u64i
+// CIR-NEXT: cir.store %[[RET]], %[[COERCE]] : !u64i, !cir.ptr<!u64i>
+// CIR-NEXT: %[[CAST:.+]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!u64i> -> !cir.ptr<!rec_S>
+// CIR-NEXT: %[[S:.+]] = cir.load %[[CAST]] : !cir.ptr<!rec_S>, !rec_S
// CIR-NEXT: cir.store align(4) %[[S]], %{{.+}} : !rec_S, !cir.ptr<!rec_S>
// LLVM-LABEL: define{{.*}} void @f4(){{.*}} {
-// LLVM: %[[S:.+]] = call %struct.S @f3()
+// LLVM: %[[COERCE:.+]] = alloca i64, i64 1, align 8
+// LLVM: %[[RET:.+]] = call i64 @f3()
+// LLVM-NEXT: store i64 %[[RET]], ptr %[[COERCE]], align 8
+// LLVM-NEXT: %[[S:.+]] = load %struct.S, ptr %[[COERCE]], align 4
// LLVM-NEXT: store %struct.S %[[S]], ptr %{{.+}}, align 4
// OGCG-LABEL: define{{.*}} void @f4() #0 {
@@ -57,13 +72,20 @@ void f7(void) {
f5(b);
}
+// Big is 40 bytes, so it goes to memory: the caller allocates the copy and
+// passes it byval.
// CIR-LABEL: cir.func{{.*}} @f7(){{.*}} {
// CIR: %[[B:.+]] = cir.load align(4) %{{.+}} : !cir.ptr<!rec_Big>, !rec_Big
-// CIR-NEXT: cir.call @f5(%[[B]]) : (!rec_Big) -> ()
+// CIR-NEXT: %[[SLOT:.+]] = cir.alloca "byval" align(8) : !cir.ptr<!rec_Big>
+// CIR-NEXT: cir.store %[[B]], %[[SLOT]] : !rec_Big, !cir.ptr<!rec_Big>
+// CIR-NEXT: cir.call @f5(%[[SLOT]]) : (!cir.ptr<!rec_Big> {llvm.align = 8 : i64, llvm.byval = !rec_Big, llvm.noalias, llvm.noundef}) -> ()
// LLVM-LABEL: define{{.*}} void @f7(){{.*}} {
// LLVM: %[[B:.+]] = load %struct.Big, ptr %{{.+}}, align 4
-// LLVM-NEXT: call void @f5(%struct.Big %[[B]])
+// LLVM-NEXT: %[[SLOT:.+]] = alloca %struct.Big, i64 1, align 8
+// LLVM-NEXT: store %struct.Big %[[B]], ptr %[[SLOT]], align 4
+// TODO(cir): CIR adds noalias to a byval argument where classic does not.
+// LLVM-NEXT: call void @f5(ptr noalias noundef byval(%struct.Big) align 8 %[[SLOT]])
// OGCG-LABEL: define{{.*}} void @f7() #0 {
// OGCG: %[[B:.+]] = alloca %struct.Big, align 8
@@ -74,12 +96,12 @@ void f8(void) {
}
// CIR-LABEL: cir.func{{.*}} @f8(){{.*}} {
-// CIR: %[[B:.+]] = cir.call @f6() : () -> !rec_Big
-// CIR: cir.store align(4) %[[B]], %{{.+}} : !rec_Big, !cir.ptr<!rec_Big>
+// CIR: %[[B:.+]] = cir.alloca "b" align(4) init : !cir.ptr<!rec_Big>
+// CIR-NEXT: cir.call @f6(%[[B]]) : (!cir.ptr<!rec_Big> {llvm.align = 4 : i64, llvm.dead_on_unwind, llvm.sret = !rec_Big, llvm.writable}) -> ()
// LLVM-LABEL: define{{.*}} void @f8(){{.*}} {
-// LLVM: %[[B:.+]] = call %struct.Big @f6()
-// LLVM-NEXT: store %struct.Big %[[B]], ptr %{{.+}}, align 4
+// LLVM: %[[B:.+]] = alloca %struct.Big, i64 1, align 4
+// LLVM-NEXT: call void @f6(ptr dead_on_unwind writable sret(%struct.Big) align 4 %[[B]])
// OGCG-LABEL: define{{.*}} void @f8() #0 {
// OGCG: %[[B:.+]] = alloca %struct.Big, align 4
@@ -89,19 +111,35 @@ void f9(void) {
f1(f3());
}
+// The result of f3 is coerced out of a slot and the argument to f1 is coerced
+// back into one, so this function carries a coerce slot for each direction.
// CIR-LABEL: cir.func{{.*}} @f9(){{.*}} {
-// CIR: %[[SLOT:.+]] = cir.alloca "agg.tmp0" align(4) : !cir.ptr<!rec_S>
-// CIR-NEXT: %[[RET:.+]] = cir.call @f3() : () -> !rec_S
-// CIR-NEXT: cir.store align(4) %[[RET]], %[[SLOT]] : !rec_S, !cir.ptr<!rec_S>
+// CIR: %[[RETSLOT:.+]] = cir.alloca "coerce" align(8) : !cir.ptr<!u64i>
+// CIR-NEXT: %[[ARGSLOT:.+]] = cir.alloca "coerce" align(8) : !cir.ptr<!rec_S>
+// CIR-NEXT: %[[SLOT:.+]] = cir.alloca "agg.tmp0" align(4) : !cir.ptr<!rec_S>
+// CIR-NEXT: %[[RET:.+]] = cir.call @f3() : () -> !u64i
+// CIR-NEXT: cir.store %[[RET]], %[[RETSLOT]] : !u64i, !cir.ptr<!u64i>
+// CIR-NEXT: %[[RETCAST:.+]] = cir.cast bitcast %[[RETSLOT]] : !cir.ptr<!u64i> -> !cir.ptr<!rec_S>
+// CIR-NEXT: %[[RETVAL:.+]] = cir.load %[[RETCAST]] : !cir.ptr<!rec_S>, !rec_S
+// CIR-NEXT: cir.store align(4) %[[RETVAL]], %[[SLOT]] : !rec_S, !cir.ptr<!rec_S>
// CIR-NEXT: %[[ARG:.+]] = cir.load align(4) %[[SLOT]] : !cir.ptr<!rec_S>, !rec_S
-// CIR-NEXT: cir.call @f1(%[[ARG]]) : (!rec_S) -> ()
+// CIR-NEXT: cir.store %[[ARG]], %[[ARGSLOT]] : !rec_S, !cir.ptr<!rec_S>
+// CIR-NEXT: %[[ARGCAST:.+]] = cir.cast bitcast %[[ARGSLOT]] : !cir.ptr<!rec_S> -> !cir.ptr<!u64i>
+// CIR-NEXT: %[[ARGVAL:.+]] = cir.load %[[ARGCAST]] : !cir.ptr<!u64i>, !u64i
+// CIR-NEXT: cir.call @f1(%[[ARGVAL]]) : (!u64i) -> ()
// LLVM-LABEL: define{{.*}} void @f9(){{.*}} {
-// LLVM: %[[SLOT:.+]] = alloca %struct.S, i64 1, align 4
-// LLVM-NEXT: %[[RET:.+]] = call %struct.S @f3()
-// LLVM-NEXT: store %struct.S %[[RET]], ptr %[[SLOT]], align 4
+// LLVM: %[[RETSLOT:.+]] = alloca i64, i64 1, align 8
+// LLVM-NEXT: %[[ARGSLOT:.+]] = alloca %struct.S, i64 1, align 8
+// LLVM-NEXT: %[[SLOT:.+]] = alloca %struct.S, i64 1, align 4
+// LLVM-NEXT: %[[RET:.+]] = call i64 @f3()
+// LLVM-NEXT: store i64 %[[RET]], ptr %[[RETSLOT]], align 8
+// LLVM-NEXT: %[[RETVAL:.+]] = load %struct.S, ptr %[[RETSLOT]], align 4
+// LLVM-NEXT: store %struct.S %[[RETVAL]], ptr %[[SLOT]], align 4
// LLVM-NEXT: %[[ARG:.+]] = load %struct.S, ptr %[[SLOT]], align 4
-// LLVM-NEXT: call void @f1(%struct.S %[[ARG]])
+// LLVM-NEXT: store %struct.S %[[ARG]], ptr %[[ARGSLOT]], align 4
+// LLVM-NEXT: %[[ARGVAL:.+]] = load i64, ptr %[[ARGSLOT]], align 8
+// LLVM-NEXT: call void @f1(i64 %[[ARGVAL]])
// OGCG-LABEL: define{{.*}} void @f9() #0 {
// OGCG: %[[SLOT:.+]] = alloca %struct.S, align 4
diff --git a/clang/test/CIR/CodeGen/call.cpp b/clang/test/CIR/CodeGen/call.cpp
index 1e01f9c090a86..9a8141704aa7b 100644
--- a/clang/test/CIR/CodeGen/call.cpp
+++ b/clang/test/CIR/CodeGen/call.cpp
@@ -2,6 +2,8 @@
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
+// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
void f1() {}
void f2() {
@@ -81,27 +83,55 @@ void f11() {
S s = f10();
}
+// S is returned in a register, so the result lands in a coerce slot and is
+// reloaded as a record.
// CIR-LABEL: cir.func{{.*}} @_Z3f11v()
-// CIR: %[[#s:]] = cir.call @_Z3f10v() : () -> !rec_S
+// CIR: %[[#coerce:]] = cir.alloca "coerce" align(8) : !cir.ptr<!u64i>
+// CIR: %[[#ret:]] = cir.call @_Z3f10v() : () -> !u64i
+// CIR-NEXT: cir.store %[[#ret]], %[[#coerce]] : !u64i, !cir.ptr<!u64i>
+// CIR-NEXT: %[[#cast:]] = cir.cast bitcast %[[#coerce]] : !cir.ptr<!u64i> -> !cir.ptr<!rec_S>
+// CIR-NEXT: %[[#s:]] = cir.load %[[#cast]] : !cir.ptr<!rec_S>, !rec_S
// CIR-NEXT: cir.store align(4) %[[#s]], %{{.+}} : !rec_S, !cir.ptr<!rec_S>
// LLVM-LABEL: define{{.*}} void @_Z3f11v(){{.*}}
-// LLVM: %[[#s:]] = call %struct.S @_Z3f10v()
+// LLVM: %[[#coerce:]] = alloca i64, i64 1, align 8
+// LLVM: %[[#ret:]] = call i64 @_Z3f10v()
+// LLVM-NEXT: store i64 %[[#ret]], ptr %[[#coerce]], align 8
+// LLVM-NEXT: %[[#s:]] = load %struct.S, ptr %[[#coerce]], align 4
// LLVM-NEXT: store %struct.S %[[#s]], ptr %{{.+}}, align 4
+// Both backends return S in one register. CIR reads it back through an i64
+// coerce slot, where classic stores the register straight into the object.
+// OGCG-LABEL: define{{.*}} void @_Z3f11v(){{.*}}
+// OGCG: %[[S:.+]] = alloca %struct.S, align 4
+// OGCG: %[[RET:.+]] = call i64 @_Z3f10v()
+// OGCG-NEXT: store i64 %[[RET]], ptr %[[S]], align 4
+
void f12() {
f10();
}
// CIR-LABEL: cir.func{{.*}} @_Z3f12v()
-// CIR: %[[#slot:]] = cir.alloca "agg.tmp0" {{.*}} : !cir.ptr<!rec_S>
-// CIR-NEXT: %[[#ret:]] = cir.call @_Z3f10v() : () -> !rec_S
-// CIR-NEXT: cir.store align(4) %[[#ret]], %[[#slot]] : !rec_S, !cir.ptr<!rec_S>
+// CIR: %[[#coerce:]] = cir.alloca "coerce" align(8) : !cir.ptr<!u64i>
+// CIR-NEXT: %[[#slot:]] = cir.alloca "agg.tmp0" {{.*}} : !cir.ptr<!rec_S>
+// CIR-NEXT: %[[#ret:]] = cir.call @_Z3f10v() : () -> !u64i
+// CIR-NEXT: cir.store %[[#ret]], %[[#coerce]] : !u64i, !cir.ptr<!u64i>
+// CIR-NEXT: %[[#cast:]] = cir.cast bitcast %[[#coerce]] : !cir.ptr<!u64i> -> !cir.ptr<!rec_S>
+// CIR-NEXT: %[[#val:]] = cir.load %[[#cast]] : !cir.ptr<!rec_S>, !rec_S
+// CIR-NEXT: cir.store align(4) %[[#val]], %[[#slot]] : !rec_S, !cir.ptr<!rec_S>
// LLVM-LABEL: define{{.*}} void @_Z3f12v(){{.*}} {
-// LLVM: %[[#slot:]] = alloca %struct.S, i64 1, align 4
-// LLVM-NEXT: %[[#ret:]] = call %struct.S @_Z3f10v()
-// LLVM-NEXT: store %struct.S %[[#ret]], ptr %[[#slot]], align 4
+// LLVM: %[[#coerce:]] = alloca i64, i64 1, align 8
+// LLVM-NEXT: %[[#slot:]] = alloca %struct.S, i64 1, align 4
+// LLVM-NEXT: %[[#ret:]] = call i64 @_Z3f10v()
+// LLVM-NEXT: store i64 %[[#ret]], ptr %[[#coerce]], align 8
+// LLVM-NEXT: %[[#val:]] = load %struct.S, ptr %[[#coerce]], align 4
+// LLVM-NEXT: store %struct.S %[[#val]], ptr %[[#slot]], align 4
+
+// OGCG-LABEL: define{{.*}} void @_Z3f12v(){{.*}}
+// OGCG: %[[COERCE:.+]] = alloca %struct.S, align 4
+// OGCG: %[[RET:.+]] = call i64 @_Z3f10v()
+// OGCG-NEXT: store i64 %[[RET]], ptr %[[COERCE]], align 4
void f13() noexcept;
void f14() {
diff --git a/clang/test/CIR/CodeGen/cast.c b/clang/test/CIR/CodeGen/cast.c
index 0ac9934e61364..b2e30c06d5bde 100644
--- a/clang/test/CIR/CodeGen/cast.c
+++ b/clang/test/CIR/CodeGen/cast.c
@@ -3,7 +3,7 @@
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
-// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
+// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
union Union { int i; float f; };
@@ -21,24 +21,43 @@ void toUnion() {
// LLVM: call float @getF()
// LLVM: ret void
+
+ // OGCG-LABEL: define dso_local void @toUnion()
+ // OGCG: call float (...) @getF()
+ // OGCG: ret void
}
// GCC assign-from-cast extension:
union Union toUnionAssign() {
- // CIR-LABEL: toUnionAssign()
- // LLVM-LABEL: toUnionAssign()
+ // CIR-LABEL: cir.func{{.*}} @toUnionAssign() -> !s32i
+ // LLVM-LABEL: define dso_local i32 @toUnionAssign()
+ // OGCG-LABEL: define dso_local i32 @toUnionAssign()
//
+ // CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_Union>
// CIR: %[[RET_ALLOCA:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<!rec_Union>
+ // LLVM: %[[COERCE:.*]] = alloca %union.Union
// LLVM: %[[RET_ALLOCA:.*]] = alloca %union.Union
+ // OGCG: %[[RET_ALLOCA:.*]] = alloca %union.Union
union Union u;
u = (union Union)42;
// CIR: %[[UNION_TO_INT:.*]] = cir.cast bitcast %[[RET_ALLOCA]] : !cir.ptr<!rec_Union> -> !cir.ptr<!s32i>
// CIR: %[[INT42:.*]] = cir.const #cir.int<42>
// CIR: cir.store align(4) %[[INT42]], %[[UNION_TO_INT]] : !s32i, !cir.ptr<!s32i>
// LLVM: store i32 42, ptr %[[RET_ALLOCA]]
+ // OGCG: store i32 42, ptr %[[RET_ALLOCA]]
return u;
+ // The union is returned in a register, so the result is reloaded from the
+ // coerce slot as i32 rather than returned as a record.
// CIR: %[[LOAD:.*]] = cir.load %[[RET_ALLOCA]] : !cir.ptr<!rec_Union>, !rec_Union
- // CIR: cir.return %[[LOAD]]
+ // CIR: cir.store %[[LOAD]], %[[COERCE]] : !rec_Union, !cir.ptr<!rec_Union>
+ // CIR: %[[COERCE_TO_INT:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_Union> -> !cir.ptr<!s32i>
+ // CIR: %[[RET:.*]] = cir.load %[[COERCE_TO_INT]] : !cir.ptr<!s32i>, !s32i
+ // CIR: cir.return %[[RET]] : !s32i
// LLVM: %[[LOAD:.*]] = load %union.Union, ptr %[[RET_ALLOCA]]
- // LLVM: ret %union.Union %[[LOAD]]
+ // LLVM: store %union.Union %[[LOAD]], ptr %[[COERCE]]
+ // LLVM: %[[RET:.*]] = load i32, ptr %[[COERCE]]
+ // LLVM: ret i32 %[[RET]]
+ // OGCG: %[[DIVE:.*]] = getelementptr inbounds nuw %union.Union, ptr %[[RET_ALLOCA]], i32 0, i32 0
+ // OGCG: %[[RET:.*]] = load i32, ptr %[[DIVE]]
+ // OGCG: ret i32 %[[RET]]
}
diff --git a/clang/test/CIR/CodeGen/catch-in-loop.cpp b/clang/test/CIR/CodeGen/catch-in-loop.cpp
index c2d960d477349..e224470c43350 100644
--- a/clang/test/CIR/CodeGen/catch-in-loop.cpp
+++ b/clang/test/CIR/CodeGen/catch-in-loop.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir --check-prefix=CIR %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll --check-prefix=LLVM %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -emit-llvm %s -o %t-ogcg.ll
// RUN: FileCheck --input-file=%t-ogcg.ll --check-prefix=OGCG %s
diff --git a/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp b/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp
index 0980c74501821..af2188f44a01b 100644
--- a/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp b/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp
index 79c614beb5a11..8e0f8a7a181c3 100644
--- a/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/cleanup-conditional.cpp b/clang/test/CIR/CodeGen/cleanup-conditional.cpp
index 6afaed51a9d4a..5f83e782c2971 100644
--- a/clang/test/CIR/CodeGen/cleanup-conditional.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-conditional.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _Complex types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/cleanup-derived-to-base-ref.cpp b/clang/test/CIR/CodeGen/cleanup-derived-to-base-ref.cpp
index b5f3f2ff2aeca..8524c1d995187 100644
--- a/clang/test/CIR/CodeGen/cleanup-derived-to-base-ref.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-derived-to-base-ref.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fcxx-exceptions -fexceptions -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -fcxx-exceptions -fexceptions -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fcxx-exceptions -fexceptions -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -fcxx-exceptions -fexceptions -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
struct Base {};
diff --git a/clang/test/CIR/CodeGen/cleanup-scope-goto-out.cpp b/clang/test/CIR/CodeGen/cleanup-scope-goto-out.cpp
index 780b90fb98fe5..76ac8e4d38c60 100644
--- a/clang/test/CIR/CodeGen/cleanup-scope-goto-out.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-scope-goto-out.cpp
@@ -38,7 +38,7 @@ end:;
// CIR: cir.label "end"
// CIR: cir.return
-// LLVM-LABEL: define dso_local void @_Z19test_goto_only_exitb(i1 noundef %{{.*}})
+// LLVM-LABEL: define dso_local void @_Z19test_goto_only_exitb(i1 noundef zeroext %{{[^,)]+}})
// LLVM: %[[A_ADDR:.*]] = alloca %struct.StructWithDestructor
// LLVM: br i1 %{{.*}}, label %[[IF_THEN:.*]], label %[[IF_END:.*]]
// LLVM: [[IF_THEN]]:
@@ -101,7 +101,7 @@ end:;
// CIR: cir.label "end"
// CIR: cir.return
-// LLVM-LABEL: define dso_local void @_Z27test_goto_among_other_exitsb(i1 noundef %{{.*}})
+// LLVM-LABEL: define dso_local void @_Z27test_goto_among_other_exitsb(i1 noundef zeroext %{{[^,)]+}})
// LLVM: %[[A_ADDR:.*]] = alloca %struct.StructWithDestructor
// LLVM: br i1 %{{.*}}, label %[[GOTO_PATH:.*]], label %[[NORMAL_PATH:.*]]
// LLVM: [[GOTO_PATH]]:
@@ -186,7 +186,7 @@ void test_goto_inner_to_outer(bool cond) {
// CIR: }
// CIR: cir.return
-// LLVM-LABEL: define dso_local void @_Z24test_goto_inner_to_outerb(i1 noundef %{{.*}})
+// LLVM-LABEL: define dso_local void @_Z24test_goto_inner_to_outerb(i1 noundef zeroext %{{[^,)]+}})
// LLVM: alloca %struct.StructWithDestructor
// LLVM: alloca %struct.StructWithDestructor
// LLVM: br i1 %{{.*}}, label %[[GOTO_PATH:.*]], label %[[NORMAL_PATH:.*]]
@@ -285,7 +285,7 @@ end:;
// CIR: cir.label "end"
// CIR: cir.return
-// LLVM-LABEL: define dso_local void @_Z27test_goto_out_of_two_nestedb(i1 noundef %{{.*}})
+// LLVM-LABEL: define dso_local void @_Z27test_goto_out_of_two_nestedb(i1 noundef zeroext %{{[^,)]+}})
// LLVM: %[[OUTER_ADDR:.*]] = alloca %struct.StructWithDestructor
// LLVM: %[[INNER_ADDR:.*]] = alloca %struct.StructWithDestructor
// LLVM: br i1 %{{.*}}, label %[[GOTO_PATH:.*]], label %[[NORMAL_PATH:.*]]
diff --git a/clang/test/CIR/CodeGen/cleanup-scope-goto-within.cpp b/clang/test/CIR/CodeGen/cleanup-scope-goto-within.cpp
index fafe7e1d1918a..2d6a3223883b9 100644
--- a/clang/test/CIR/CodeGen/cleanup-scope-goto-within.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-scope-goto-within.cpp
@@ -40,7 +40,7 @@ void test_goto_within_cleanup(bool cond) {
// CIR: }
// CIR: cir.return
-// LLVM-LABEL: define dso_local void @_Z24test_goto_within_cleanupb(i1 noundef %{{.*}})
+// LLVM-LABEL: define dso_local void @_Z24test_goto_within_cleanupb(i1 noundef zeroext %{{[^,)]+}})
// LLVM: %[[COND_ADDR:.*]] = alloca i8
// LLVM: %[[A_ADDR:.*]] = alloca %struct.StructWithDestructor
// LLVM: %[[COND_BYTE:.*]] = load i8, ptr %[[COND_ADDR]]
@@ -111,7 +111,7 @@ void test_goto_jump_into_nested_op(bool cond1, bool cond2) {
// CIR: }
// CIR: cir.return
-// LLVM-LABEL: define dso_local void @_Z29test_goto_jump_into_nested_opbb(i1 noundef %{{.*}}, i1 noundef %{{.*}})
+// LLVM-LABEL: define dso_local void @_Z29test_goto_jump_into_nested_opbb(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: %[[COND1_ADDR:.*]] = alloca i8
// LLVM: %[[COND2_ADDR:.*]] = alloca i8
// LLVM: %[[A_ADDR:.*]] = alloca %struct.StructWithDestructor
diff --git a/clang/test/CIR/CodeGen/cleanup-scope-throw-caught.cpp b/clang/test/CIR/CodeGen/cleanup-scope-throw-caught.cpp
index ff313033e9a85..b8adde241e5cc 100644
--- a/clang/test/CIR/CodeGen/cleanup-scope-throw-caught.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-scope-throw-caught.cpp
@@ -1,8 +1,10 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: cir-opt -cir-hoist-allocas -cir-flatten-cfg -cir-eh-abi-lowering %t.cir -o %t.eh.cir
// RUN: FileCheck --input-file=%t.eh.cir %s -check-prefix=CIR-EHABI
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/cleanup.cpp b/clang/test/CIR/CodeGen/cleanup.cpp
index ea3d9c55d05dd..8135bd9f36e09 100644
--- a/clang/test/CIR/CodeGen/cleanup.cpp
+++ b/clang/test/CIR/CodeGen/cleanup.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _Complex types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s
struct Struk {
diff --git a/clang/test/CIR/CodeGen/complex-cast.cpp b/clang/test/CIR/CodeGen/complex-cast.cpp
index 97767a9764c9d..5dc65ffd72037 100644
--- a/clang/test/CIR/CodeGen/complex-cast.cpp
+++ b/clang/test/CIR/CodeGen/complex-cast.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-canonicalize -o %t.cir %s 2>&1 | FileCheck --check-prefix=CIR-BEFORE %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -mmlir --mlir-print-ir-after=cir-lowering-prepare -o %t.cir %s 2>&1 | FileCheck --check-prefixes=CIR-AFTER %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _Complex types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-canonicalize -o %t.cir %s 2>&1 | FileCheck --check-prefix=CIR-BEFORE %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-after=cir-lowering-prepare -o %t.cir %s 2>&1 | FileCheck --check-prefixes=CIR-AFTER %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/complex.cpp b/clang/test/CIR/CodeGen/complex.cpp
index b59e26058bd36..593434d8a0440 100644
--- a/clang/test/CIR/CodeGen/complex.cpp
+++ b/clang/test/CIR/CodeGen/complex.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _Complex types.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/convert-incomplete-type.cpp b/clang/test/CIR/CodeGen/convert-incomplete-type.cpp
index 5f44b1e3a8f31..c196ed282bdc3 100644
--- a/clang/test/CIR/CodeGen/convert-incomplete-type.cpp
+++ b/clang/test/CIR/CodeGen/convert-incomplete-type.cpp
@@ -21,14 +21,15 @@ void use() {
// CIR: cir.func {{.*}} @_Z3usev()
// CIR: %[[FP:.*]] = cir.get_global @fp
// CIR: %[[LOAD:.*]] = cir.load {{.*}} %[[FP]]
-// CIR: cir.call %[[LOAD]]() : (!cir.ptr<!cir.func<() -> !rec_Delayed>>) -> !rec_Delayed
-
-// The difference between LLVM and OGCG is due to missing ABI lowering.
+// A single-int record is returned in a register, so the indirect callee is
+// bitcast to a function returning !s32i before the call.
+// CIR: %[[FN:.*]] = cir.cast bitcast %[[LOAD]] : !cir.ptr<!cir.func<() -> !rec_Delayed>> -> !cir.ptr<!cir.func<() -> !s32i>>
+// CIR: cir.call %[[FN]]() : (!cir.ptr<!cir.func<() -> !s32i>>) -> !s32i
// LLVM: @fp = global ptr null
// LLVM: define {{.*}} void @_Z3usev()
// LLVM: %[[FP:.*]] = load ptr, ptr @fp
-// LLVM: %[[CALL:.*]] = call %struct.Delayed %[[FP]]()
+// LLVM: %[[CALL:.*]] = call i32 %[[FP]]()
// OGCG: @fp = global ptr null
// OGCG: define {{.*}} void @_Z3usev()
diff --git a/clang/test/CIR/CodeGen/ctor-try-body.cpp b/clang/test/CIR/CodeGen/ctor-try-body.cpp
index 21967ceebfc10..7162bbdae2a7c 100644
--- a/clang/test/CIR/CodeGen/ctor-try-body.cpp
+++ b/clang/test/CIR/CodeGen/ctor-try-body.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM,LLVMCIR
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM,OGCG
diff --git a/clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp b/clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp
index 69a8059b09484..f4aee0452914f 100644
--- a/clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp
+++ b/clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _Complex types and parameters of an empty or tag class.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/cxx23-explicit-object-member.cpp b/clang/test/CIR/CodeGen/cxx23-explicit-object-member.cpp
index fd07b9729f31f..8a48c0b3da08e 100644
--- a/clang/test/CIR/CodeGen/cxx23-explicit-object-member.cpp
+++ b/clang/test/CIR/CodeGen/cxx23-explicit-object-member.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/cxx2b-static-call-operator.cpp b/clang/test/CIR/CodeGen/cxx2b-static-call-operator.cpp
index 61d404646f85f..11507c38883de 100644
--- a/clang/test/CIR/CodeGen/cxx2b-static-call-operator.cpp
+++ b/clang/test/CIR/CodeGen/cxx2b-static-call-operator.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/default-func-attrs-invoke.cpp b/clang/test/CIR/CodeGen/default-func-attrs-invoke.cpp
index 0e7dcd9c49d18..5e92fafbd23cd 100644
--- a/clang/test/CIR/CodeGen/default-func-attrs-invoke.cpp
+++ b/clang/test/CIR/CodeGen/default-func-attrs-invoke.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/delete-destroying.cpp b/clang/test/CIR/CodeGen/delete-destroying.cpp
index 27ed405a0fe47..f59a558d6fd00 100644
--- a/clang/test/CIR/CodeGen/delete-destroying.cpp
+++ b/clang/test/CIR/CodeGen/delete-destroying.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -mconstructor-aliases -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -mconstructor-aliases -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -mconstructor-aliases -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -mconstructor-aliases -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/dtors.cpp b/clang/test/CIR/CodeGen/dtors.cpp
index d75acd0b6d4ed..83ace808b8a98 100644
--- a/clang/test/CIR/CodeGen/dtors.cpp
+++ b/clang/test/CIR/CodeGen/dtors.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/enum-bool.cpp b/clang/test/CIR/CodeGen/enum-bool.cpp
index 67fe1396cbd4d..8dce4fabc6dc2 100644
--- a/clang/test/CIR/CodeGen/enum-bool.cpp
+++ b/clang/test/CIR/CodeGen/enum-bool.cpp
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
-// RUN: FileCheck --check-prefixes=LLVM,LLVMCIR --input-file=%t-cir.ll %s
+// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
-// RUN: FileCheck --check-prefixes=LLVM,OGCG --input-file=%t.ll %s
+// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
enum BoolEnum : bool { False, True };
@@ -16,8 +16,7 @@ BoolEnum loadEnum(BoolEnum *p) { return *p; }
// CIR: %[[V:.*]] = cir.load {{.*}}%[[PV]] : !cir.ptr<!cir.bool>, !cir.bool
// CIR: cir.return
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z8loadEnumP8BoolEnum(ptr noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z8loadEnumP8BoolEnum(ptr noundef %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z8loadEnumP8BoolEnum(ptr noundef %{{[^,)]+}})
// LLVM: load i8, ptr %{{.*}}, align 1
// LLVM: ret i1 %{{.*}}
@@ -29,8 +28,7 @@ void storeEnum(BoolEnum *p, BoolEnum v) { *p = v; }
// CIR: %[[P:.*]] = cir.load deref {{.*}} : !cir.ptr<!cir.ptr<!cir.bool>>, !cir.ptr<!cir.bool>
// CIR: cir.store {{.*}}%[[V]], %[[P]] : !cir.bool, !cir.ptr<!cir.bool>
-// LLVMCIR-LABEL: define dso_local void @_Z9storeEnumP8BoolEnumS_(ptr noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local void @_Z9storeEnumP8BoolEnumS_(ptr noundef %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local void @_Z9storeEnumP8BoolEnumS_(ptr noundef %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: zext i1 %{{.*}} to i8
// LLVM: store i8 %{{.*}}, ptr %{{.*}}, align 1
// LLVM: load i8, ptr %{{.*}}, align 1
@@ -44,8 +42,7 @@ bool toBool(BoolEnum e) { return static_cast<bool>(e); }
// CIR-NOT: cir.cast int_to_bool
// CIR: cir.return
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z6toBool8BoolEnum(i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z6toBool8BoolEnum(i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z6toBool8BoolEnum(i1 noundef zeroext %{{[^,)]+}})
// LLVM: ret i1 %{{.*}}
// An unscoped enum is integer-promoted before the comparison, so cir.cmp sees
@@ -57,8 +54,7 @@ bool ltUnscopedEnum(BoolEnum a, BoolEnum b) { return a < b; }
// CIR: %[[B:.*]] = cir.cast bool_to_int %{{.*}} : !cir.bool -> !s32i
// CIR: cir.cmp lt %[[A]], %[[B]] : !s32i
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z14ltUnscopedEnum8BoolEnumS_(i1 noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z14ltUnscopedEnum8BoolEnumS_(i1 noundef zeroext %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z14ltUnscopedEnum8BoolEnumS_(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: zext i1 %{{.*}} to i32
// LLVM: zext i1 %{{.*}} to i32
// LLVM: icmp slt i32 %{{.*}}, %{{.*}}
@@ -71,8 +67,7 @@ bool ltPlainBool(bool a, bool b) { return a < b; }
// CIR: %[[B:.*]] = cir.cast bool_to_int %{{.*}} : !cir.bool -> !s32i
// CIR: cir.cmp lt %[[A]], %[[B]] : !s32i
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z11ltPlainBoolbb(i1 noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z11ltPlainBoolbb(i1 noundef zeroext %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z11ltPlainBoolbb(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: zext i1 %{{.*}} to i32
// LLVM: zext i1 %{{.*}} to i32
// LLVM: icmp slt i32 %{{.*}}, %{{.*}}
@@ -86,8 +81,7 @@ bool eqEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a == b; }
// CIR-LABEL: cir.func{{.*}} @_Z6eqEnum14ScopedBoolEnumS_
// CIR: cir.cmp eq %{{.*}}, %{{.*}} : !cir.bool
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z6eqEnum14ScopedBoolEnumS_(i1 noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z6eqEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z6eqEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: icmp eq i1 %{{.*}}, %{{.*}}
bool neEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a != b; }
@@ -95,8 +89,7 @@ bool neEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a != b; }
// CIR-LABEL: cir.func{{.*}} @_Z6neEnum14ScopedBoolEnumS_
// CIR: cir.cmp ne %{{.*}}, %{{.*}} : !cir.bool
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z6neEnum14ScopedBoolEnumS_(i1 noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z6neEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z6neEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: icmp ne i1 %{{.*}}, %{{.*}}
bool ltEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a < b; }
@@ -104,8 +97,7 @@ bool ltEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a < b; }
// CIR-LABEL: cir.func{{.*}} @_Z6ltEnum14ScopedBoolEnumS_
// CIR: cir.cmp lt %{{.*}}, %{{.*}} : !cir.bool
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z6ltEnum14ScopedBoolEnumS_(i1 noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z6ltEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z6ltEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: icmp ult i1 %{{.*}}, %{{.*}}
bool leEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a <= b; }
@@ -113,8 +105,7 @@ bool leEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a <= b; }
// CIR-LABEL: cir.func{{.*}} @_Z6leEnum14ScopedBoolEnumS_
// CIR: cir.cmp le %{{.*}}, %{{.*}} : !cir.bool
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z6leEnum14ScopedBoolEnumS_(i1 noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z6leEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z6leEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: icmp ule i1 %{{.*}}, %{{.*}}
bool gtEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a > b; }
@@ -122,8 +113,7 @@ bool gtEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a > b; }
// CIR-LABEL: cir.func{{.*}} @_Z6gtEnum14ScopedBoolEnumS_
// CIR: cir.cmp gt %{{.*}}, %{{.*}} : !cir.bool
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z6gtEnum14ScopedBoolEnumS_(i1 noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z6gtEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z6gtEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: icmp ugt i1 %{{.*}}, %{{.*}}
bool geEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a >= b; }
@@ -131,6 +121,5 @@ bool geEnum(ScopedBoolEnum a, ScopedBoolEnum b) { return a >= b; }
// CIR-LABEL: cir.func{{.*}} @_Z6geEnum14ScopedBoolEnumS_
// CIR: cir.cmp ge %{{.*}}, %{{.*}} : !cir.bool
-// LLVMCIR-LABEL: define dso_local noundef i1 @_Z6geEnum14ScopedBoolEnumS_(i1 noundef %{{.*}}, i1 noundef %{{.*}})
-// OGCG-LABEL: define dso_local noundef zeroext i1 @_Z6geEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{.*}}, i1 noundef zeroext %{{.*}})
+// LLVM-LABEL: define dso_local noundef zeroext i1 @_Z6geEnum14ScopedBoolEnumS_(i1 noundef zeroext %{{[^,)]+}}, i1 noundef zeroext %{{[^,)]+}})
// LLVM: icmp uge i1 %{{.*}}, %{{.*}}
diff --git a/clang/test/CIR/CodeGen/forrange.cpp b/clang/test/CIR/CodeGen/forrange.cpp
index 610db867e7ad9..1b188e2c7dafc 100644
--- a/clang/test/CIR/CodeGen/forrange.cpp
+++ b/clang/test/CIR/CodeGen/forrange.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
struct Element {};
diff --git a/clang/test/CIR/CodeGen/global-decomp-decls.cpp b/clang/test/CIR/CodeGen/global-decomp-decls.cpp
index b031bb7d21f6a..493bfee4f2070 100644
--- a/clang/test/CIR/CodeGen/global-decomp-decls.cpp
+++ b/clang/test/CIR/CodeGen/global-decomp-decls.cpp
@@ -29,19 +29,27 @@ auto [t1, t2, t3] = t;
// LLVM: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}}@_ZDC2t12t22t3E, ptr {{.*}}@t, i64 12, i1 false)
const auto & [t11, t12, t13] = getT<Type>();
+// A three-int record spans two eightbytes, so it is returned in a register
+// pair.
+// CIR: cir.func {{.*}} @_Z4getTI4TypeEDav() -> !rec_anon_struct
+
// CIR: cir.global external @_ZDC3t113t123t13E = #cir.ptr<null> : !cir.ptr<!rec_Type>
// CIR: cir.func internal private @__cxx_global_var_init{{.*}}() {
+// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_anon_struct>
// CIR: %[[SB:.*]] = cir.get_global @_ZDC3t113t123t13E : !cir.ptr<!cir.ptr<!rec_Type>>
// CIR: %[[SB_REF:.*]] = cir.get_global @_ZGRDC3t113t123t13E_ : !cir.ptr<!rec_Type>
-// CIR: %[[GETTCALL:.*]] = cir.call @_Z4getTI4TypeEDav() : () -> !rec_Type
-// CIR: cir.store align(4) %[[GETTCALL]], %[[SB_REF]] : !rec_Type, !cir.ptr<!rec_Type>
+// CIR: %[[GETTCALL:.*]] = cir.call @_Z4getTI4TypeEDav() : () -> !rec_anon_struct
+// CIR: cir.store %[[GETTCALL]], %[[COERCE]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR: %[[COERCE_REC:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_anon_struct> -> !cir.ptr<!rec_Type>
+// CIR: %[[TVAL:.*]] = cir.load %[[COERCE_REC]] : !cir.ptr<!rec_Type>, !rec_Type
+// CIR: cir.store align(4) %[[TVAL]], %[[SB_REF]] : !rec_Type, !cir.ptr<!rec_Type>
// CIR: cir.store align(8) %[[SB_REF]], %[[SB]] : !cir.ptr<!rec_Type>, !cir.ptr<!cir.ptr<!rec_Type>>
// LLVM: define internal void @__cxx_global_var_init{{.*}}()
-// LLVMCIR: %[[GETTCALL:.*]] = call %struct.Type @_Z4getTI4TypeEDav()
-// OGCG: %[[GETTCALL:.*]] = call { i64, i32 } @_Z4getTI4TypeEDav()
-// LLVMCIR: store %struct.Type %[[GETTCALL]], ptr @_ZGRDC3t113t123t13E_, align 4
-// OGCG: store { i64, i32 } %call, ptr %[[COERCED_PTR:.*]],
+// LLVM: %[[GETTCALL:.*]] = call { i64, i32 } @_Z4getTI4TypeEDav()
+// LLVM: store { i64, i32 } %[[GETTCALL]], ptr %[[COERCED_PTR:.*]], align 8
+// LLVMCIR: %[[TVAL:.*]] = load %struct.Type, ptr %[[COERCED_PTR]], align 4
+// LLVMCIR: store %struct.Type %[[TVAL]], ptr @_ZGRDC3t113t123t13E_, align 4
// OGCG: call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_ZGRDC3t113t123t13E_, ptr align 8 %[[COERCED_PTR]], i64 12, i1 false)
// LLVM: store ptr @_ZGRDC3t113t123t13E_, ptr @_ZDC3t113t123t13E, align 8
diff --git a/clang/test/CIR/CodeGen/if.cpp b/clang/test/CIR/CodeGen/if.cpp
index 773e201ce8cfe..511623809b4ee 100644
--- a/clang/test/CIR/CodeGen/if.cpp
+++ b/clang/test/CIR/CodeGen/if.cpp
@@ -26,7 +26,7 @@ int if0(bool a) {
// CIR-NEXT: }
-// LLVM: define{{.*}} i32 @_Z3if0b(i1 noundef %0)
+// LLVM: define{{.*}} i32 @_Z3if0b(i1 noundef zeroext %0)
// LLVM: br label %[[ENTRY:.*]]
// LLVM: [[ENTRY]]:
// LLVM: %6 = load i8, ptr %2, align 1
@@ -165,7 +165,7 @@ void if2(int a, bool b, bool c) {
// CIR: }
// CIR: }
-// LLVM: define{{.*}} void @_Z3if2ibb(i32 noundef %[[A:.*]], i1 noundef %[[B:.*]], i1 noundef %[[C:.*]])
+// LLVM: define{{.*}} void @_Z3if2ibb(i32 noundef %[[A:.*]], i1 noundef zeroext %[[B:.*]], i1 noundef zeroext %[[C:.*]])
// LLVM: %[[VARA:.*]] = alloca i32, i64 1, align 4
// LLVM: %[[VARB:.*]] = alloca i8, i64 1, align 1
// LLVM: %[[VARC:.*]] = alloca i8, i64 1, align 1
diff --git a/clang/test/CIR/CodeGen/instantiate-init.cpp b/clang/test/CIR/CodeGen/instantiate-init.cpp
index 27a406818f402..230de6f1155b9 100644
--- a/clang/test/CIR/CodeGen/instantiate-init.cpp
+++ b/clang/test/CIR/CodeGen/instantiate-init.cpp
@@ -24,6 +24,9 @@ void init_vec_using_initalizer_list() {
Vector vec = {0, 1, 2};
}
+// std::initializer_list<int> is two eightbytes, so the constructor takes the
+// data pointer and the size as separate register arguments.
+// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_std3A3Ainitializer_list3Cint3E>
// CIR: %[[VEC_ADDR:.*]] = cir.alloca "vec" {{.*}} init : !cir.ptr<!rec_Vector>
// CIR: %[[AGG_ADDR:.*]] = cir.alloca "agg.tmp0" {{.*}} : !cir.ptr<!rec_std3A3Ainitializer_list3Cint3E>
// CIR: %[[INIT_LIST_ADDR:.*]] = cir.alloca "ref.tmp0" {{.*}} : !cir.ptr<!cir.array<!s32i x 3>>
@@ -45,7 +48,13 @@ void init_vec_using_initalizer_list() {
// CIR: %[[SIZE_PTR:.*]] = cir.get_member %[[AGG_ADDR]][1] {name = "size"} : !cir.ptr<!rec_std3A3Ainitializer_list3Cint3E> -> !cir.ptr<!u64i>
// CIR: cir.store {{.*}} %[[CONST_U64_3]], %[[SIZE_PTR]] : !u64i, !cir.ptr<!u64i>
// CIR: %[[TMP_AGG:.*]] = cir.load {{.*}} %[[AGG_ADDR]] : !cir.ptr<!rec_std3A3Ainitializer_list3Cint3E>, !rec_std3A3Ainitializer_list3Cint3E
-// CIR: cir.call @_ZN6VectorC1ESt16initializer_listIiE(%[[VEC_ADDR]], %[[TMP_AGG]]) : (!cir.ptr<!rec_Vector> {llvm.align = 1 : i64, llvm.dereferenceable = 1 : i64, llvm.nonnull, llvm.noundef}, !rec_std3A3Ainitializer_list3Cint3E) -> ()
+// CIR: cir.store %[[TMP_AGG]], %[[COERCE]] : !rec_std3A3Ainitializer_list3Cint3E, !cir.ptr<!rec_std3A3Ainitializer_list3Cint3E>
+// CIR: %[[COERCE_REC:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_std3A3Ainitializer_list3Cint3E> -> !cir.ptr<!rec_anon_struct>
+// CIR: %[[DATA_SLOT:.*]] = cir.get_member %[[COERCE_REC]][0] {name = ""} : !cir.ptr<!rec_anon_struct> -> !cir.ptr<!cir.ptr<!void>>
+// CIR: %[[DATA_ARG:.*]] = cir.load %[[DATA_SLOT]] : !cir.ptr<!cir.ptr<!void>>, !cir.ptr<!void>
+// CIR: %[[SIZE_SLOT:.*]] = cir.get_member %[[COERCE_REC]][1] {name = ""} : !cir.ptr<!rec_anon_struct> -> !cir.ptr<!u64i>
+// CIR: %[[SIZE_ARG:.*]] = cir.load %[[SIZE_SLOT]] : !cir.ptr<!u64i>, !u64i
+// CIR: cir.call @_ZN6VectorC1ESt16initializer_listIiE(%[[VEC_ADDR]], %[[DATA_ARG]], %[[SIZE_ARG]]) : (!cir.ptr<!rec_Vector> {llvm.align = 1 : i64, llvm.dereferenceable = 1 : i64, llvm.nonnull, llvm.noundef}, !cir.ptr<!void>, !u64i) -> ()
// CIR: cir.cleanup.scope {
// CIR: cir.yield
// CIR: } cleanup normal {
@@ -53,6 +62,7 @@ void init_vec_using_initalizer_list() {
// CIR: cir.yield
// CIR: }
+// LLVM: %[[COERCE:.*]] = alloca %"class.std::initializer_list<int>", i64 1, align 8
// LLVM: %[[VEC_ADDR:.*]] = alloca %struct.Vector, i64 1, align 1
// LLVM: %[[AGG_ADDR:.*]] = alloca %"class.std::initializer_list<int>", i64 1, align 8
// LLVM: %[[INIT_LIST_ADDR:.*]] = alloca [3 x i32], i64 1, align 4
@@ -67,7 +77,12 @@ void init_vec_using_initalizer_list() {
// LLVM: %[[SIZE_PTR:.*]] = getelementptr inbounds nuw %"class.std::initializer_list<int>", ptr %[[AGG_ADDR]], i32 0, i32 1
// LLVM: store i64 3, ptr %[[SIZE_PTR]], align 8
// LLVM: %[[TMP_AGG:.*]] = load %"class.std::initializer_list<int>", ptr %[[AGG_ADDR]], align 8
-// LLVM: call void @_ZN6VectorC1ESt16initializer_listIiE(ptr noundef nonnull align 1 dereferenceable(1) %[[VEC_ADDR]], %"class.std::initializer_list<int>" %[[TMP_AGG]])
+// LLVM: store %"class.std::initializer_list<int>" %[[TMP_AGG]], ptr %[[COERCE]], align 8
+// LLVM: %[[DATA_SLOT:.*]] = getelementptr inbounds nuw { ptr, i64 }, ptr %[[COERCE]], i32 0, i32 0
+// LLVM: %[[DATA_ARG:.*]] = load ptr, ptr %[[DATA_SLOT]], align 8
+// LLVM: %[[SIZE_SLOT:.*]] = getelementptr inbounds nuw { ptr, i64 }, ptr %[[COERCE]], i32 0, i32 1
+// LLVM: %[[SIZE_ARG:.*]] = load i64, ptr %[[SIZE_SLOT]], align 8
+// LLVM: call void @_ZN6VectorC1ESt16initializer_listIiE(ptr noundef nonnull align 1 dereferenceable(1) %[[VEC_ADDR]], ptr %[[DATA_ARG]], i64 %[[SIZE_ARG]])
// LLVM: br label %[[SCOPE_CONT:.*]]
// LLVM: [[SCOPE_CONT]]:
// LLVM: br label %[[CLEANUP_START:.*]]
diff --git a/clang/test/CIR/CodeGen/invoke-attrs.cpp b/clang/test/CIR/CodeGen/invoke-attrs.cpp
index aeb2d0cfbc386..630a9a2d54462 100644
--- a/clang/test/CIR/CodeGen/invoke-attrs.cpp
+++ b/clang/test/CIR/CodeGen/invoke-attrs.cpp
@@ -1,8 +1,10 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: cir-opt --cir-flatten-cfg %t.cir -o %t-flat.cir
// RUN: FileCheck --input-file=%t-flat.cir %s --check-prefix=CIR-FLAT
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/label.c b/clang/test/CIR/CodeGen/label.c
index 0e0a18bf3e97a..8c104f1fccf5e 100644
--- a/clang/test/CIR/CodeGen/label.c
+++ b/clang/test/CIR/CodeGen/label.c
@@ -185,15 +185,15 @@ void foo() {
// CIR: cir.label "label"
// LLVM: define dso_local void @foo(){{.*}} {
-// LLVM: [[ALLOC:%.*]] = alloca %struct.S, i64 1, align 1
+// LLVM: %{{.*}} = alloca %struct.S, i64 1, align 1
// LLVM: br label %2
// LLVM:2:
// LLVM: br label %3
// LLVM:3:
-// LLVM: [[CALL:%.*]] = call %struct.S @get()
-// LLVM: store %struct.S [[CALL]], ptr [[ALLOC]], align 1
-// LLVM: [[LOAD:%.*]] = load %struct.S, ptr [[ALLOC]], align 1
-// LLVM: call void @bar(%struct.S [[LOAD]])
+// An empty struct occupies no eightbytes, so neither the return value nor the
+// argument is passed.
+// LLVM: call void @get()
+// LLVM: call void @bar()
// OGCG: define dso_local void @foo()
// OGCG: %agg.tmp = alloca %struct.S, align 1
diff --git a/clang/test/CIR/CodeGen/lambda-dtor-field.cpp b/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
index 8dde8f71d1b6b..4fab405bd93ad 100644
--- a/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
+++ b/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
@@ -34,15 +34,19 @@ void capture_one(S s) {
// LLVM: call void @_ZN1SD1Ev(ptr {{.*}} %[[FIELD1]])
// LLVM: ret void
+// A non-trivially-copyable class is passed indirectly, so the parameter is a
+// pointer to the caller's object and no local copy is allocated. CIR marks
+// that pointer byref where classic CodeGen leaves it a plain noundef pointer,
+// so the two signatures are pinned separately.
// LLVM-LABEL: define dso_local void @_Z11capture_one1S(
-// LLVM: %[[S_ALLOCA:.*]] = alloca %struct.S
+// LLVM-SAME: ptr byref(%struct.S) align 4 %[[S_ARG:[^,)]+]])
// LLVM: %[[LAM1:.*]] = alloca %[[LAM_TY_1]]
// LLVM: %[[F1:.*]] = getelementptr inbounds nuw %[[LAM_TY_1]], ptr %[[LAM1]], i32 0, i32 0
-// LLVM: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[F1]], ptr {{.*}} %[[S_ALLOCA]])
+// LLVM: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[F1]], ptr {{.*}} %[[S_ARG]])
// LLVM: call void @"_ZZ11capture_one1SEN3$_0D1Ev"(ptr {{.*}} %[[LAM1]])
// LLVM: ret void
-// OGCG-LABEL: define dso_local void @_Z11capture_one1S(
+// OGCG-LABEL: define dso_local void @_Z11capture_one1S(ptr noundef align 4 %{{[^,)]+}})
// OGCG: %[[LAM1:.*]] = alloca %[[LAM_TY_1:.*]], align 4
// OGCG: %[[FIELD1:.*]] = getelementptr inbounds nuw %[[LAM_TY_1]], ptr %[[LAM1]], i32 0, i32 0
// OGCG: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[FIELD1]], ptr {{.*}} %s)
@@ -80,14 +84,13 @@ void capture_two(S a, S b) {
// LLVM: call void @_ZN1SD1Ev(ptr {{.*}} %[[FA_D]])
// LLVM: ret void
-// LLVM-LABEL: define dso_local void @_Z11capture_two1SS_(%struct.S {{.*}}, %struct.S {{.*}}) #{{.*}} personality ptr @__gxx_personality_v0 {
-// LLVM: %[[A_ALLOCA:.*]] = alloca %struct.S
-// LLVM: %[[B_ALLOCA:.*]] = alloca %struct.S
+// LLVM-LABEL: define dso_local void @_Z11capture_two1SS_(
+// LLVM-SAME: ptr byref(%struct.S) align 4 %[[A_ARG:[^,)]+]], ptr byref(%struct.S) align 4 %[[B_ARG:[^,)]+]]) #{{.*}} personality ptr @__gxx_personality_v0 {
// LLVM: %[[LAM2:.*]] = alloca %[[LAM_TY_2]]
// LLVM: %[[FA:.*]] = getelementptr inbounds nuw %[[LAM_TY_2]], ptr %[[LAM2]], i32 0, i32 0
-// LLVM: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[FA]], ptr {{.*}} %[[A_ALLOCA]])
+// LLVM: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[FA]], ptr {{.*}} %[[A_ARG]])
// LLVM: %[[FB:.*]] = getelementptr inbounds nuw %[[LAM_TY_2]], ptr %[[LAM2]], i32 0, i32 1
-// LLVM: invoke void @_ZN1SC1ERKS_(ptr {{.*}} %[[FB]], ptr {{.*}} %[[B_ALLOCA]])
+// LLVM: invoke void @_ZN1SC1ERKS_(ptr {{.*}} %[[FB]], ptr {{.*}} %[[B_ARG]])
// LLVM: to label %{{.*}} unwind label %{{.*}}
// LLVM: call void @"_ZZ11capture_two1SS_EN3$_0D1Ev"(ptr {{.*}} %[[LAM2]])
// LLVM: ret void
@@ -127,18 +130,18 @@ void capture_mixed(int n, S s) {
// LLVM: ret void
// LLVM-LABEL: define dso_local void @_Z13capture_mixedi1S(
+// LLVM-SAME: i32 {{[^,)]*}} %{{[^,)]+}}, ptr byref(%struct.S) align 4 %[[S_ARG2:[^,)]+]])
// LLVM: %[[N_ALLOCA:.*]] = alloca i32
-// LLVM: %[[S_ALLOCA2:.*]] = alloca %struct.S
// LLVM: %[[LAM3:.*]] = alloca %[[LAM_TY_3]]
// LLVM: %[[FN:.*]] = getelementptr inbounds nuw %[[LAM_TY_3]], ptr %[[LAM3]], i32 0, i32 0
// LLVM: %[[NVAL:.*]] = load i32, ptr %[[N_ALLOCA]]
// LLVM: store i32 %[[NVAL]], ptr %[[FN]]
// LLVM: %[[FS:.*]] = getelementptr inbounds nuw %[[LAM_TY_3]], ptr %[[LAM3]], i32 0, i32 1
-// LLVM: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[FS]], ptr {{.*}} %[[S_ALLOCA2]])
+// LLVM: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[FS]], ptr {{.*}} %[[S_ARG2]])
// LLVM: call void @"_ZZ13capture_mixedi1SEN3$_0D1Ev"(ptr {{.*}} %[[LAM3]])
// LLVM: ret void
-// OGCG-LABEL: define dso_local void @_Z13capture_mixedi1S(
+// OGCG-LABEL: define dso_local void @_Z13capture_mixedi1S(i32 noundef %{{[^,)]+}}, ptr noundef align 4 %{{[^,)]+}})
// OGCG: %[[LAM3:.*]] = alloca %[[LAM_TY_3:.*]], align 4
// OGCG: %[[FN:.*]] = getelementptr inbounds nuw %[[LAM_TY_3]], ptr %[[LAM3]], i32 0, i32 0
// OGCG: %[[NVAL:.*]] = load i32, ptr %n.addr
@@ -250,7 +253,7 @@ void stmt_expr_return(bool cond) {
// LLVM: call void @_ZN1SD1Ev(ptr {{.*}} %[[FA5_D]])
// LLVM: ret void
-// LLVM-LABEL: define dso_local void @_Z16stmt_expr_returnb({{.*}}) {{.*}} personality ptr @__gxx_personality_v0 {
+// LLVM-LABEL: define dso_local void @_Z16stmt_expr_returnb(i1 noundef zeroext %{{[^,)]+}}) {{.*}} personality ptr @__gxx_personality_v0 {
// LLVM: %[[LAM5:.*]] = alloca %[[LAM_TY_5]]
// LLVM: %[[ACTIVE_ALLOCA:.*]] = alloca i8
// LLVM: %[[FA5:.*]] = getelementptr inbounds nuw %[[LAM_TY_5]], ptr %[[LAM5]], i32 0, i32 0
diff --git a/clang/test/CIR/CodeGen/lambda-static-invoker-agg-return.cpp b/clang/test/CIR/CodeGen/lambda-static-invoker-agg-return.cpp
index 16ed63aaa80de..0cc0b577d7114 100644
--- a/clang/test/CIR/CodeGen/lambda-static-invoker-agg-return.cpp
+++ b/clang/test/CIR/CodeGen/lambda-static-invoker-agg-return.cpp
@@ -20,30 +20,24 @@ S agg_invoker() {
}
// CIR-LABEL: cir.func no_inline internal private dso_local @_ZZ11agg_invokervEN3$_08__invokeEi
-// CIR-SAME: (%[[I_ARG:.*]]: !s32i {{.*}}) -> !rec_S
+// CIR-SAME: (%[[AGG_RESULT:.*]]: !cir.ptr<!rec_S> {{.*}}llvm.sret = !rec_S{{.*}}, %[[I_ARG:.*]]: !s32i {{.*}})
// CIR: %[[I_ALLOCA:.*]] = cir.alloca "i" {{.*}} init : !cir.ptr<!s32i>
-// CIR: %[[RETVAL:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<!rec_S>
// CIR: %[[UNUSED:.*]] = cir.alloca "unused.capture" {{.*}} : !cir.ptr<!rec_anon{{.*}}>
-// CIR-NOT: cir.alloca {{.*}} ["agg.tmp
+// CIR-NOT: cir.alloca "agg.tmp
// CIR: cir.store %[[I_ARG]], %[[I_ALLOCA]]
// CIR: %[[I:.*]] = cir.load{{.*}} %[[I_ALLOCA]]
-// CIR: %[[CALL:.*]] = cir.call @_ZZ11agg_invokervENK3$_0clEi(%[[UNUSED]], %[[I]]){{.*}} -> !rec_S
+// CIR: cir.call @_ZZ11agg_invokervENK3$_0clEi(%[[AGG_RESULT]], %[[UNUSED]], %[[I]])
// CIR-NOT: cir.copy
-// CIR: cir.store{{.*}} %[[CALL]], %[[RETVAL]]
-// CIR: %[[RET:.*]] = cir.load %[[RETVAL]]
-// CIR: cir.return %[[RET]]
+// CIR: cir.return
-// LLVM-LABEL: define internal %struct.S @"_ZZ11agg_invokervEN3$_08__invokeEi"
-// LLVM-SAME: (i32 {{[^,)]*}} %[[I_ARG:[^,)]+]])
+// LLVM-LABEL: define internal void @"_ZZ11agg_invokervEN3$_08__invokeEi"
+// LLVM-SAME: (ptr dead_on_unwind noalias writable sret(%struct.S) align 4 %[[AGG_RESULT:[^,)]+]], i32 {{[^,)]*}} %[[I_ARG:[^,)]+]])
// LLVM: %[[I_ALLOCA:.*]] = alloca i32
-// LLVM: %[[RETVAL:.*]] = alloca %struct.S
// LLVM: %[[UNUSED:.*]] = alloca %class.anon
// LLVM: store i32 %[[I_ARG]], ptr %[[I_ALLOCA]]
// LLVM: %[[I:.*]] = load i32, ptr %[[I_ALLOCA]]
-// LLVM: %[[CALL:.*]] = call %struct.S @"_ZZ11agg_invokervENK3$_0clEi"(ptr {{.*}} %[[UNUSED]], i32 {{.*}} %[[I]])
-// LLVM: store %struct.S %[[CALL]], ptr %[[RETVAL]]
-// LLVM: %[[RET:.*]] = load %struct.S, ptr %[[RETVAL]]
-// LLVM: ret %struct.S %[[RET]]
+// LLVM: call void @"_ZZ11agg_invokervENK3$_0clEi"(ptr {{.*}} sret(%struct.S) {{[^,]*}} %[[AGG_RESULT]], ptr {{.*}} %[[UNUSED]], i32 {{.*}} %[[I]])
+// LLVM: ret void
// OGCG-LABEL: define internal void @"_ZZ11agg_invokervEN3$_08__invokeEi"
// OGCG-SAME: (ptr {{.*}} sret(%struct.S) {{[^,]*}} %[[AGG_RESULT:[^,]+]], i32 {{[^,)]*}} %[[I_ARG:[^,)]+]])
diff --git a/clang/test/CIR/CodeGen/lambda.cpp b/clang/test/CIR/CodeGen/lambda.cpp
index 90fa8c16b5081..b742c6c48975f 100644
--- a/clang/test/CIR/CodeGen/lambda.cpp
+++ b/clang/test/CIR/CodeGen/lambda.cpp
@@ -157,27 +157,33 @@ auto g() {
};
}
-// CIR: cir.func {{.*}} @_Z1gv() -> ![[REC_LAM_G:.*]] attributes {{{.*}}nothrow} {
+// A lambda capturing one reference is a single-pointer record, so it is
+// returned in a register.
+// CIR: cir.func {{.*}} @_Z1gv() -> !cir.ptr<!void> attributes {{{.*}}nothrow} {
+// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<![[REC_LAM_G:.*]]>
// CIR: %[[RETVAL:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<![[REC_LAM_G]]>
// CIR: %[[I_ADDR:.*]] = cir.alloca "i" {{.*}} init : !cir.ptr<!s32i>
// CIR: %[[TWELVE:.*]] = cir.const #cir.int<12> : !s32i
// CIR: cir.store{{.*}} %[[TWELVE]], %[[I_ADDR]] : !s32i, !cir.ptr<!s32i>
// CIR: %[[I_ADDR_ADDR:.*]] = cir.get_member %[[RETVAL]][0] {name = "i"} : !cir.ptr<![[REC_LAM_G]]> -> !cir.ptr<!cir.ptr<!s32i>>
// CIR: cir.store{{.*}} %[[I_ADDR]], %[[I_ADDR_ADDR]] : !cir.ptr<!s32i>, !cir.ptr<!cir.ptr<!s32i>>
-// CIR: %[[RET:.*]] = cir.load{{.*}} %[[RETVAL]] : !cir.ptr<![[REC_LAM_G]]>, ![[REC_LAM_G]]
-// CIR: cir.return %[[RET]] : ![[REC_LAM_G]]
-
-// Note: In this case, OGCG returns a pointer to the 'i' field of the lambda,
-// whereas CIR and LLVM return the lambda itself.
-
-// LLVM: define dso_local %[[REC_LAM_G:.*]] @_Z1gv()
+// CIR: %[[LAM:.*]] = cir.load{{.*}} %[[RETVAL]] : !cir.ptr<![[REC_LAM_G]]>, ![[REC_LAM_G]]
+// CIR: cir.store %[[LAM]], %[[COERCE]] : ![[REC_LAM_G]], !cir.ptr<![[REC_LAM_G]]>
+// CIR: %[[COERCE_PTR:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<![[REC_LAM_G]]> -> !cir.ptr<!cir.ptr<!void>>
+// CIR: %[[RET:.*]] = cir.load %[[COERCE_PTR]] : !cir.ptr<!cir.ptr<!void>>, !cir.ptr<!void>
+// CIR: cir.return %[[RET]] : !cir.ptr<!void>
+
+// LLVM: define dso_local ptr @_Z1gv()
+// LLVM: %[[COERCE:.*]] = alloca %[[REC_LAM_G:.*]], i64 1
// LLVM: %[[RETVAL:.*]] = alloca %[[REC_LAM_G]]
// LLVM: %[[I:.*]] = alloca i32
// LLVM: store i32 12, ptr %[[I]]
// LLVM: %[[I_ADDR:.*]] = getelementptr inbounds nuw %[[REC_LAM_G]], ptr %[[RETVAL]], i32 0, i32 0
// LLVM: store ptr %[[I]], ptr %[[I_ADDR]]
-// LLVM: %[[RET:.*]] = load %[[REC_LAM_G]], ptr %[[RETVAL]]
-// LLVM: ret %[[REC_LAM_G]] %[[RET]]
+// LLVM: %[[LAM:.*]] = load %[[REC_LAM_G]], ptr %[[RETVAL]]
+// LLVM: store %[[REC_LAM_G]] %[[LAM]], ptr %[[COERCE]]
+// LLVM: %[[RET:.*]] = load ptr, ptr %[[COERCE]]
+// LLVM: ret ptr %[[RET]]
// OGCG: define dso_local ptr @_Z1gv()
// OGCG: %[[RETVAL:.*]] = alloca %[[REC_LAM_G:.*]],
@@ -199,24 +205,31 @@ auto g2() {
}
// Should be same as above because of NRVO
-// CIR: cir.func {{.*}} @_Z2g2v() -> ![[REC_LAM_G2:.*]] attributes {{{.*}}nothrow} {
+// CIR: cir.func {{.*}} @_Z2g2v() -> !cir.ptr<!void> attributes {{{.*}}nothrow} {
+// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<![[REC_LAM_G2:.*]]>
// CIR: %[[RETVAL:.*]] = cir.alloca "__retval" {{.*}} init : !cir.ptr<![[REC_LAM_G2]]>
// CIR: %[[I_ADDR:.*]] = cir.alloca "i" {{.*}} init : !cir.ptr<!s32i>
// CIR: %[[TWELVE:.*]] = cir.const #cir.int<12> : !s32i
// CIR: cir.store{{.*}} %[[TWELVE]], %[[I_ADDR]] : !s32i, !cir.ptr<!s32i>
// CIR: %[[I_ADDR_ADDR:.*]] = cir.get_member %[[RETVAL]][0] {name = "i"} : !cir.ptr<![[REC_LAM_G2]]> -> !cir.ptr<!cir.ptr<!s32i>>
// CIR: cir.store{{.*}} %[[I_ADDR]], %[[I_ADDR_ADDR]] : !cir.ptr<!s32i>, !cir.ptr<!cir.ptr<!s32i>>
-// CIR: %[[RET:.*]] = cir.load{{.*}} %[[RETVAL]] : !cir.ptr<![[REC_LAM_G2]]>, ![[REC_LAM_G2]]
-// CIR: cir.return %[[RET]] : ![[REC_LAM_G2]]
-
-// LLVM: define dso_local %[[REC_LAM_G:.*]] @_Z2g2v()
+// CIR: %[[LAM:.*]] = cir.load{{.*}} %[[RETVAL]] : !cir.ptr<![[REC_LAM_G2]]>, ![[REC_LAM_G2]]
+// CIR: cir.store %[[LAM]], %[[COERCE]] : ![[REC_LAM_G2]], !cir.ptr<![[REC_LAM_G2]]>
+// CIR: %[[COERCE_PTR:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<![[REC_LAM_G2]]> -> !cir.ptr<!cir.ptr<!void>>
+// CIR: %[[RET:.*]] = cir.load %[[COERCE_PTR]] : !cir.ptr<!cir.ptr<!void>>, !cir.ptr<!void>
+// CIR: cir.return %[[RET]] : !cir.ptr<!void>
+
+// LLVM: define dso_local ptr @_Z2g2v()
+// LLVM: %[[COERCE:.*]] = alloca %[[REC_LAM_G:.*]], i64 1
// LLVM: %[[RETVAL:.*]] = alloca %[[REC_LAM_G]]
// LLVM: %[[I:.*]] = alloca i32
// LLVM: store i32 12, ptr %[[I]]
// LLVM: %[[I_ADDR:.*]] = getelementptr inbounds nuw %[[REC_LAM_G]], ptr %[[RETVAL]], i32 0, i32 0
// LLVM: store ptr %[[I]], ptr %[[I_ADDR]]
-// LLVM: %[[RET:.*]] = load %[[REC_LAM_G]], ptr %[[RETVAL]]
-// LLVM: ret %[[REC_LAM_G]] %[[RET]]
+// LLVM: %[[LAM:.*]] = load %[[REC_LAM_G]], ptr %[[RETVAL]]
+// LLVM: store %[[REC_LAM_G]] %[[LAM]], ptr %[[COERCE]]
+// LLVM: %[[RET:.*]] = load ptr, ptr %[[COERCE]]
+// LLVM: ret ptr %[[RET]]
// OGCG: define dso_local ptr @_Z2g2v()
// OGCG: %[[RETVAL:.*]] = alloca %[[REC_LAM_G2:.*]],
@@ -251,10 +264,14 @@ int f() {
// CIR: cir.return %[[RET]]
// CIR: cir.func {{.*}} @_Z1fv() -> (!s32i{{.*}})
+// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!cir.ptr<!void>>
// CIR: %[[RETVAL:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<!s32i>
// CIR: %[[TMP:.*]] = cir.alloca "ref.tmp0" {{.*}} : !cir.ptr<![[REC_LAM_G2]]>
-// CIR: %[[G2:.*]] = cir.call @_Z2g2v() : () -> ![[REC_LAM_G2]]
-// CIR: cir.store{{.*}} %[[G2]], %[[TMP]]
+// CIR: %[[G2:.*]] = cir.call @_Z2g2v() : () -> !cir.ptr<!void>
+// CIR: cir.store %[[G2]], %[[COERCE]] : !cir.ptr<!void>, !cir.ptr<!cir.ptr<!void>>
+// CIR: %[[COERCE_REC:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!cir.ptr<!void>> -> !cir.ptr<![[REC_LAM_G2]]>
+// CIR: %[[LAM:.*]] = cir.load %[[COERCE_REC]] : !cir.ptr<![[REC_LAM_G2]]>, ![[REC_LAM_G2]]
+// CIR: cir.store{{.*}} %[[LAM]], %[[TMP]]
// CIR: %[[RESULT:.*]] = cir.call @_ZZ2g2vENK3$_0clEv(%[[TMP]])
// CIR: cir.store{{.*}} %[[RESULT]], %[[RETVAL]]
// CIR: %[[RET:.*]] = cir.load{{.*}} %[[RETVAL]]
@@ -278,10 +295,13 @@ int f() {
// LLVM: ret i32 %[[RET]]
// LLVM: define {{.*}} i32 @_Z1fv()
+// LLVM: %[[COERCE:.*]] = alloca ptr
// LLVM: %[[RETVAL:.*]] = alloca i32
// LLVM: %[[TMP:.*]] = alloca %[[REC_LAM_G2]]
-// LLVM: %[[G2:.*]] = call %[[REC_LAM_G2]] @_Z2g2v()
-// LLVM: store %[[REC_LAM_G2]] %[[G2]], ptr %[[TMP]]
+// LLVM: %[[G2:.*]] = call ptr @_Z2g2v()
+// LLVM: store ptr %[[G2]], ptr %[[COERCE]]
+// LLVM: %[[LAM:.*]] = load %[[REC_LAM_G2]], ptr %[[COERCE]]
+// LLVM: store %[[REC_LAM_G2]] %[[LAM]], ptr %[[TMP]]
// LLVM: %[[RESULT:.*]] = call {{.*}}i32 @"_ZZ2g2vENK3$_0clEv"(ptr {{.*}} %[[TMP]])
// LLVM: store i32 %[[RESULT]], ptr %[[RETVAL]]
// LLVM: %[[RET:.*]] = load i32, ptr %[[RETVAL]]
diff --git a/clang/test/CIR/CodeGen/long-double-inc-dec.cpp b/clang/test/CIR/CodeGen/long-double-inc-dec.cpp
index daf71e5af5a46..30f0ad2582d11 100644
--- a/clang/test/CIR/CodeGen/long-double-inc-dec.cpp
+++ b/clang/test/CIR/CodeGen/long-double-inc-dec.cpp
@@ -1,20 +1,22 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the !cir.long_double wrapper and the f16 and f128 types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR -DLDTY=cir.double
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM,LLVMCIR -DLDTY=double
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,OGCG -DLDTY=double
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -fclangir -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR -DLDTY=cir.f80
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM,LLVMCIR -DLDTY=x86_fp80
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,OGCG -DLDTY=x86_fp80
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -fclangir -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR -DLDTY=cir.f128
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM,LLVMCIR -DLDTY=fp128
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,OGCG -DLDTY=fp128
diff --git a/clang/test/CIR/CodeGen/loop-cond-cleanup.cpp b/clang/test/CIR/CodeGen/loop-cond-cleanup.cpp
index 31237845baf0d..7d9696d281d13 100644
--- a/clang/test/CIR/CodeGen/loop-cond-cleanup.cpp
+++ b/clang/test/CIR/CodeGen/loop-cond-cleanup.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -emit-cir -std=c++17 -fcxx-exceptions -fexceptions -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -std=c++17 -fcxx-exceptions -fexceptions -o %t.cir
// RUN: FileCheck -check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t-cir.ll
+// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t-cir.ll
// RUN: FileCheck -check-prefixes=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t.ll
// RUN: FileCheck -check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/loop-cond-var-cleanup.cpp b/clang/test/CIR/CodeGen/loop-cond-var-cleanup.cpp
index 221c86a08e4db..7a4588b20b716 100644
--- a/clang/test/CIR/CodeGen/loop-cond-var-cleanup.cpp
+++ b/clang/test/CIR/CodeGen/loop-cond-var-cleanup.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -emit-cir -std=c++17 -fcxx-exceptions -fexceptions -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -std=c++17 -fcxx-exceptions -fexceptions -o %t.cir
// RUN: FileCheck -check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t-cir.ll
+// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t-cir.ll
// RUN: FileCheck -check-prefixes=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t.ll
// RUN: FileCheck -check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/mem-expr-fn.cpp b/clang/test/CIR/CodeGen/mem-expr-fn.cpp
index 00a33383f60d6..bf2b29a25e858 100644
--- a/clang/test/CIR/CodeGen/mem-expr-fn.cpp
+++ b/clang/test/CIR/CodeGen/mem-expr-fn.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/new-delete-deactivation.cpp b/clang/test/CIR/CodeGen/new-delete-deactivation.cpp
index 7517bd70fef35..050dd9abf413a 100644
--- a/clang/test/CIR/CodeGen/new-delete-deactivation.cpp
+++ b/clang/test/CIR/CodeGen/new-delete-deactivation.cpp
@@ -30,8 +30,7 @@ A *deact_simple() { return new A(makeB()); }
// CIR: cir.cleanup.scope {
// CIR: %[[TRUE:.*]] = cir.const #true
// CIR: cir.store %[[TRUE]], %[[ACTIVE]] : !cir.bool, !cir.ptr<!cir.bool>
-// CIR: %[[MAKEB:.*]] = cir.call @_Z5makeBv() : () -> !rec_B
-// CIR: cir.store{{.*}} %[[MAKEB]], %[[TMP]] : !rec_B, !cir.ptr<!rec_B>
+// CIR: cir.call @_Z5makeBv(%[[TMP]]) : (!cir.ptr<!rec_B> {{.*}}llvm.sret = !rec_B{{.*}}) -> ()
// CIR: cir.cleanup.scope {
// CIR: %[[CONV:.*]] = cir.call @_ZN1BcviEv(%[[TMP]])
// CIR: cir.call @_ZN1AC1Ei({{.*}})
@@ -52,7 +51,7 @@ A *deact_simple() { return new A(makeB()); }
// LLVM: %[[ACTIVE:.*]] = alloca i8
// LLVM: %[[PTR:.*]] = call nonnull ptr @_Znwm(i64 1) #[[ATTR_BUILTIN_NEW:.*]]
// LLVM: store i8 1, ptr %[[ACTIVE]]
-// LLVM: %[[MAKEB:.*]] = invoke %struct.B @_Z5makeBv()
+// LLVM: invoke void @_Z5makeBv(ptr dead_on_unwind writable sret(%struct.B) align 4 %[[TMP]])
// LLVM: to label %[[INVOKE_CONT:.*]] unwind label %[[UNWIND_OUTER:.*]]
// LLVM: [[INVOKE_CONT]]:
// LLVM: invoke void @_ZN1AC1Ei(ptr {{.*}} %[[PTR]], i32 {{.*}})
@@ -122,7 +121,7 @@ A *deact_if(bool cond) {
// CIR: }
// CIR: }
-// LLVM-LABEL: define dso_local ptr @_Z8deact_ifb(i1 %0) {{.*}} personality ptr @__gxx_personality_v0 {
+// LLVM-LABEL: define dso_local ptr @_Z8deact_ifb(i1 zeroext %0) {{.*}} personality ptr @__gxx_personality_v0 {
// LLVM: br i1 %{{.*}}, label %[[THEN:.*]], label %[[END:.*]]
// LLVM: [[THEN]]:
// LLVM: %[[PTR:.*]] = call nonnull ptr @_Znwm(i64 1) #[[ATTR_BUILTIN_NEW]]
@@ -177,7 +176,7 @@ A *deact_ternary(bool cond) { return (new A(makeB()), cond) ? nullptr : nullptr;
// CIR: }
// CIR: }
-// LLVM-LABEL: define dso_local ptr @_Z13deact_ternaryb(i1 %0) {{.*}} personality ptr @__gxx_personality_v0 {
+// LLVM-LABEL: define dso_local ptr @_Z13deact_ternaryb(i1 zeroext %0) {{.*}} personality ptr @__gxx_personality_v0 {
// LLVM: %[[PTR:.*]] = call nonnull ptr @_Znwm(i64 1) #[[ATTR_BUILTIN_NEW]]
// LLVM: store i8 1, ptr %[[ACTIVE:.*]]
// LLVM: invoke void @_ZN1AC1Ei(ptr {{.*}} %[[PTR]], i32 {{.*}})
@@ -243,7 +242,7 @@ A *deact_while_cond(int n) {
// LLVM: [[WHILE_COND]]:
// LLVM: %[[PTR:.*]] = call nonnull ptr @_Znwm(i64 1) #[[ATTR_BUILTIN_NEW]]
// LLVM: store i8 1, ptr %[[ACTIVE]]
-// LLVM: invoke %struct.B @_Z5makeBv()
+// LLVM: invoke void @_Z5makeBv(ptr dead_on_unwind writable sret(%struct.B) align 4 %[[TMP]])
// LLVM: to label %[[INVOKE_CONT:.*]] unwind label %[[UNWIND_OUTER:.*]]
// LLVM: [[INVOKE_CONT]]:
// LLVM: invoke void @_ZN1AC1Ei(ptr {{.*}} %[[PTR]], i32 {{.*}})
diff --git a/clang/test/CIR/CodeGen/new-null.cpp b/clang/test/CIR/CodeGen/new-null.cpp
index 298ab033c149e..2f46d89273fad 100644
--- a/clang/test/CIR/CodeGen/new-null.cpp
+++ b/clang/test/CIR/CodeGen/new-null.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/nofpclass.c b/clang/test/CIR/CodeGen/nofpclass.c
index 1d9eb1109b813..6c75c43b2724a 100644
--- a/clang/test/CIR/CodeGen/nofpclass.c
+++ b/clang/test/CIR/CodeGen/nofpclass.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _Complex types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/non-odr-use-const-bool.cpp b/clang/test/CIR/CodeGen/non-odr-use-const-bool.cpp
index 34ba4162205c5..6eb7295a864c0 100644
--- a/clang/test/CIR/CodeGen/non-odr-use-const-bool.cpp
+++ b/clang/test/CIR/CodeGen/non-odr-use-const-bool.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/non-scalar-lval-return.cpp b/clang/test/CIR/CodeGen/non-scalar-lval-return.cpp
index 06ce1a8c41d1b..caf7f60e41e10 100644
--- a/clang/test/CIR/CodeGen/non-scalar-lval-return.cpp
+++ b/clang/test/CIR/CodeGen/non-scalar-lval-return.cpp
@@ -12,28 +12,44 @@ struct Struct {
extern "C" Struct getStruct(int i) { return i; }
+// A single-int record fits in one eightbyte, so it is returned in a register.
+// CIR: cir.func {{.*}} @getStruct(%{{[^,)]+}}: !s32i {{.*}}) -> !s32i
+// LLVM: define dso_local i32 @getStruct(i32 noundef %{{[^,)]+}})
+
extern "C" void use() {
int g = getStruct(0).member;
+ // The register-returned i32 lands in a coerce slot that is then reread as a
+ // Struct. Classic CodeGen instead stores it straight through a GEP to the
+ // first member.
// CIR-LABEL: @use()
+ // CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!s32i>
// CIR: %[[G_ALLOCA:.*]] = cir.alloca "g" {{.*}} init : !cir.ptr<!s32i>
// CIR: %[[TEMP_ALLOCA:.*]] = cir.alloca {{.*}} : !cir.ptr<!rec_Struct>
// CIR: %[[ZERO:.*]] = cir.const #cir.int<0> : !s32i
// CIR: %[[GET_STRUCT_CALL:.*]] = cir.call @getStruct(%[[ZERO]])
- // CIR: cir.store{{.*}} %[[GET_STRUCT_CALL]], %[[TEMP_ALLOCA]]
+ // CIR: cir.store{{.*}} %[[GET_STRUCT_CALL]], %[[COERCE]] : !s32i, !cir.ptr<!s32i>
+ // CIR: %[[COERCE_REC:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!s32i> -> !cir.ptr<!rec_Struct>
+ // CIR: %[[STRUCT_VAL:.*]] = cir.load %[[COERCE_REC]] : !cir.ptr<!rec_Struct>, !rec_Struct
+ // CIR: cir.store{{.*}} %[[STRUCT_VAL]], %[[TEMP_ALLOCA]]
// CIR: %[[GET_MEMBER:.*]] = cir.get_member %[[TEMP_ALLOCA]][0] {name = "member"}
// CIR: %[[LOAD_MEM:.*]] = cir.load{{.*}}%[[GET_MEMBER]]
// CIR: cir.store{{.*}} %[[LOAD_MEM]], %[[G_ALLOCA]] : !s32i, !cir.ptr<!s32i>
//
// LLVM-LABEL: @use()
- // LLVM: %[[G_ALLOCA:.*]] = alloca i32
- // LLVM: %[[TEMP_ALLOCA:.*]] = alloca %struct.Struct
+ // LLVMCIR: %[[COERCE:.*]] = alloca i32
+ // LLVMCIR: %[[G_ALLOCA:.*]] = alloca i32
+ // LLVMCIR: %[[TEMP_ALLOCA:.*]] = alloca %struct.Struct
+ // LLVMCIR: %[[GET_STRUCT_CALL:.*]] = call i32 @getStruct(i32 noundef 0)
+ // LLVMCIR: store i32 %[[GET_STRUCT_CALL]], ptr %[[COERCE]]
+ // LLVMCIR: %[[STRUCT_VAL:.*]] = load %struct.Struct, ptr %[[COERCE]]
+ // LLVMCIR: store %struct.Struct %[[STRUCT_VAL]], ptr %[[TEMP_ALLOCA]]
//
- // LLVMCIR: %[[GET_STRUCT_CALL:.*]] = call %struct.Struct @getStruct(i32 noundef 0)
- // LLVMCIR: store %struct.Struct %[[GET_STRUCT_CALL]], ptr %[[TEMP_ALLOCA]]
- // OGCG: %[[GET_STRUCT_CALL_BEFORE:.*]] = call i32 @getStruct(i32 noundef 0)
- // OGCG: %[[GET_STRUCT_CALL:.*]] = getelementptr{{.*}}%struct.Struct, ptr %[[TEMP_ALLOCA]], i32 0, i32 0
- // OGCG: store i32 %[[GET_STRUCT_CALL_BEFORE]], ptr %[[GET_STRUCT_CALL]]
+ // OGCG: %[[G_ALLOCA:.*]] = alloca i32
+ // OGCG: %[[TEMP_ALLOCA:.*]] = alloca %struct.Struct
+ // OGCG: %[[GET_STRUCT_CALL:.*]] = call i32 @getStruct(i32 noundef 0)
+ // OGCG: %[[COERCE_DIVE:.*]] = getelementptr{{.*}}%struct.Struct, ptr %[[TEMP_ALLOCA]], i32 0, i32 0
+ // OGCG: store i32 %[[GET_STRUCT_CALL]], ptr %[[COERCE_DIVE]]
//
// LLVM: %[[GET_MEMBER:.*]] = getelementptr {{.*}}%struct.Struct, ptr %[[TEMP_ALLOCA]], i32 0, i32 0
// LLVM: %[[LOAD_MEM:.*]] = load i32, ptr %[[GET_MEMBER]]
diff --git a/clang/test/CIR/CodeGen/nrvo.cpp b/clang/test/CIR/CodeGen/nrvo.cpp
index fc06b29ed6736..dac5ec941a7a9 100644
--- a/clang/test/CIR/CodeGen/nrvo.cpp
+++ b/clang/test/CIR/CodeGen/nrvo.cpp
@@ -1,8 +1,10 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-elide-constructors -fclangir -emit-cir %s -o %t-noelide.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-elide-constructors -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t-noelide.cir
// RUN: FileCheck --input-file=%t-noelide.cir %s --check-prefix=CIR-NOELIDE
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/pack-indexing.cpp b/clang/test/CIR/CodeGen/pack-indexing.cpp
index 47ecc236a89e9..31e9f4922e5c6 100644
--- a/clang/test/CIR/CodeGen/pack-indexing.cpp
+++ b/clang/test/CIR/CodeGen/pack-indexing.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _Complex types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -fclangir -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/paren-list-agg-init.cpp b/clang/test/CIR/CodeGen/paren-list-agg-init.cpp
index 37b0b42a6f7dc..7af20a5ace7f0 100644
--- a/clang/test/CIR/CodeGen/paren-list-agg-init.cpp
+++ b/clang/test/CIR/CodeGen/paren-list-agg-init.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports padded, packed, and over-aligned record shapes.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM,LLVMCIR
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,OGCG
diff --git a/clang/test/CIR/CodeGen/partial-array-cleanup.cpp b/clang/test/CIR/CodeGen/partial-array-cleanup.cpp
index df85f69f21e35..11c9629f14c85 100644
--- a/clang/test/CIR/CodeGen/partial-array-cleanup.cpp
+++ b/clang/test/CIR/CodeGen/partial-array-cleanup.cpp
@@ -1,7 +1,9 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fexceptions -fcxx-exceptions -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before-lp.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -fexceptions -fcxx-exceptions -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before-lp.cir
// RUN: FileCheck --input-file=%t-before-lp.cir %s -check-prefix=CIR-BEFORE-LPP
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fexceptions -fcxx-exceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fexceptions -fcxx-exceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/pointer-to-member-func-cast.cpp b/clang/test/CIR/CodeGen/pointer-to-member-func-cast.cpp
index f884be1c5e68b..850b9ef9a918c 100644
--- a/clang/test/CIR/CodeGen/pointer-to-member-func-cast.cpp
+++ b/clang/test/CIR/CodeGen/pointer-to-member-func-cast.cpp
@@ -7,7 +7,7 @@
// RUN: FileCheck --input-file=%t.ll --check-prefixes=OGCG,OGCG-X86 %s
// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -std=c++17 -fclangir -emit-cir -mmlir -mlir-print-ir-before=cir-cxxabi-lowering %s -o %t-arm.cir 2> %t-arm-before.cir
-// RUN: FileCheck --check-prefix=CIR-BEFORE --input-file=%t-before.cir %s
+// RUN: FileCheck --check-prefix=CIR-BEFORE --input-file=%t-arm-before.cir %s
// RUN: FileCheck --check-prefixes=CIR-AFTER,CIR-AFTER-ARM --input-file=%t-arm.cir %s
// RUN: %clang_cc1 -triple aarch64-unknown-linux-gnu -std=c++17 -fclangir -emit-llvm %s -o %t-arm-cir.ll
// RUN: FileCheck --input-file=%t-arm-cir.ll --check-prefixes=LLVM,LLVM-ARM %s
@@ -32,7 +32,8 @@ bool memfunc_to_bool(void (Foo::*func)(int)) {
// CIR-BEFORE: %{{.*}} = cir.cast member_ptr_to_bool %{{.*}} : !cir.method<!cir.func<(!cir.ptr<!rec_Foo>, !s32i)> in !rec_Foo> -> !cir.bool
// CIR-AFTER: cir.func {{.*}} @_Z15memfunc_to_boolM3FooFviE
-// CIR-AFTER: %[[FUNC:.*]] = cir.load{{.*}} %{{.*}} : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
+// CIR-AFTER: cir.store %{{.*}}, %[[FUNC_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR-AFTER: %[[FUNC:.*]] = cir.load{{.*}} %[[FUNC_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: %[[NULL_VAL:.*]] = cir.const #cir.int<0> : !s64i
// CIR-AFTER: %[[FUNC_PTR:.*]] = cir.extract_member %[[FUNC]][0] : !rec_anon_struct -> !s64i
// CIR-AFTER: %[[BOOL_VAL:.*]] = cir.cmp ne %[[FUNC_PTR]], %[[NULL_VAL]] : !s64i
@@ -46,8 +47,10 @@ bool memfunc_to_bool(void (Foo::*func)(int)) {
// CIR-AFTER-X86-NOT: cir.cmp
// CIR-AFTER-X86-NOT: cir.or
-// LLVM: define {{.*}} i1 @_Z15memfunc_to_boolM3FooFviE
-// LLVM: %[[FUNC:.*]] = load { i64, i64 }, ptr %{{.*}}
+// LLVM-X86: define dso_local noundef zeroext i1 @_Z15memfunc_to_boolM3FooFviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// LLVM-ARM: define dso_local noundef i1 @_Z15memfunc_to_boolM3FooFviE({ i64, i64 } %{{[^,)]+}})
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[FUNC_ADDR:.*]], align 8
+// LLVM: %[[FUNC:.*]] = load { i64, i64 }, ptr %[[FUNC_ADDR]]
// LLVM: %[[FUNC_PTR:.*]] = extractvalue { i64, i64 } %[[FUNC]], 0
// LLVM: %[[BOOL_VAL:.*]] = icmp ne i64 %[[FUNC_PTR]], 0
// LLVM-ARM: %[[ADJ:.*]] = extractvalue { i64, i64 } %[[FUNC]], 1
@@ -60,11 +63,8 @@ bool memfunc_to_bool(void (Foo::*func)(int)) {
// LLVM-X86-NOT: or i1
-// Note: OGCG uses an extra temporary for the function argument because it
-// composes it from coerced arguments. We'll do that in CIR too after
-// calling convention lowering is implemented.
-
-// OGCG: define {{.*}} i1 @_Z15memfunc_to_boolM3FooFviE
+// OGCG-X86: define dso_local noundef zeroext i1 @_Z15memfunc_to_boolM3FooFviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// OGCG-ARM: define dso_local noundef i1 @_Z15memfunc_to_boolM3FooFviE([2 x i64] %{{[^,)]+}})
// OGCG: %[[FUNC_TMP:.*]] = load { i64, i64 }, ptr %{{.*}}
// OGCG: store { i64, i64 } %[[FUNC_TMP]], ptr %[[FUNC_ADDR:.*]]
// OGCG: %[[FUNC:.*]] = load { i64, i64 }, ptr %[[FUNC_ADDR]]
@@ -87,19 +87,22 @@ auto memfunc_reinterpret(void (Foo::*func)(int)) -> void (Bar::*)() {
// CIR-BEFORE: %{{.*}} = cir.cast bitcast %{{.*}} : !cir.method<!cir.func<(!cir.ptr<!rec_Foo>, !s32i)> in !rec_Foo> -> !cir.method<!cir.func<(!cir.ptr<!rec_Bar>)> in !rec_Bar>
// CIR-AFTER: cir.func {{.*}} @_Z19memfunc_reinterpretM3FooFviE
-// CIR-AFTER: %[[FUNC:.*]] = cir.load{{.*}} %{{.*}} : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
+// CIR-AFTER: cir.store %{{.*}}, %[[FUNC_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR-AFTER: %[[FUNC:.*]] = cir.load{{.*}} %[[FUNC_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: cir.store %[[FUNC]], %[[RET_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
// CIR-AFTER: %[[RET:.*]] = cir.load{{.*}} %[[RET_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: cir.return %[[RET]] : !rec_anon_struct
-// LLVM: define {{.*}} { i64, i64 } @_Z19memfunc_reinterpretM3FooFviE
-// LLVM: %[[FUNC:.*]] = load { i64, i64 }, ptr %{{.*}}
+// LLVM-X86: define dso_local { i64, i64 } @_Z19memfunc_reinterpretM3FooFviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// LLVM-ARM: define dso_local { i64, i64 } @_Z19memfunc_reinterpretM3FooFviE({ i64, i64 } %{{[^,)]+}})
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[FUNC_ADDR:.*]], align 8
+// LLVM: %[[FUNC:.*]] = load { i64, i64 }, ptr %[[FUNC_ADDR]]
// LLVM: store { i64, i64 } %[[FUNC]], ptr %[[RET_ADDR:.*]]
// LLVM: %[[RET:.*]] = load { i64, i64 }, ptr %[[RET_ADDR]]
// LLVM: ret { i64, i64 } %[[RET]]
-// OGCG-X86: define {{.*}} { i64, i64 } @_Z19memfunc_reinterpretM3FooFviE
-// OGCG-ARM: define {{.*}} [2 x i64] @_Z19memfunc_reinterpretM3FooFviE
+// OGCG-X86: define dso_local { i64, i64 } @_Z19memfunc_reinterpretM3FooFviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// OGCG-ARM: define dso_local [2 x i64] @_Z19memfunc_reinterpretM3FooFviE([2 x i64] %{{[^,)]+}})
// OGCG: %[[FUNC:.*]] = load { i64, i64 }, ptr %{{.*}}
// OGCG: store { i64, i64 } %[[FUNC]], ptr %[[FUNC_ADDR:[^,]+]]
// OGCG-X86: %[[RET:.*]] = load { i64, i64 }, ptr %[[FUNC_ADDR]]
@@ -143,17 +146,16 @@ DerivedMemFunc base_to_derived_zero_offset(Base1MemFunc ptr) {
// CIR-AFTER: %[[RET_VAL:.*]] = cir.load %[[RET]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: cir.return %[[RET_VAL]] : !rec_anon_struct
-// LLVM: define {{.*}} { i64, i64 } @_Z27base_to_derived_zero_offsetM5Base1FviE
-// LLVM: %[[ARG_ADDR:.*]] = alloca { i64, i64 }
-// LLVM: %[[RET_ADDR:.*]] = alloca { i64, i64 }
-// LLVM: store { i64, i64 } %{{.*}}, ptr %[[ARG_ADDR]]
+// LLVM-X86: define dso_local { i64, i64 } @_Z27base_to_derived_zero_offsetM5Base1FviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// LLVM-ARM: define dso_local { i64, i64 } @_Z27base_to_derived_zero_offsetM5Base1FviE({ i64, i64 } %{{[^,)]+}})
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[ARG_ADDR:.*]], align 8
// LLVM: %[[TMP:.*]] = load { i64, i64 }, ptr %[[ARG_ADDR]]
-// LLVM: store { i64, i64 } %[[TMP]], ptr %[[RET_ADDR]]
+// LLVM: store { i64, i64 } %[[TMP]], ptr %[[RET_ADDR:.*]], align 8
// LLVM: %[[RET:.*]] = load { i64, i64 }, ptr %[[RET_ADDR]]
// LLVM: ret { i64, i64 } %[[RET]]
-// OGCG-X86: define {{.*}} { i64, i64 } @_Z27base_to_derived_zero_offsetM5Base1FviE
-// OGCG-ARM: define {{.*}} [2 x i64] @_Z27base_to_derived_zero_offsetM5Base1FviE
+// OGCG-X86: define dso_local { i64, i64 } @_Z27base_to_derived_zero_offsetM5Base1FviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// OGCG-ARM: define dso_local [2 x i64] @_Z27base_to_derived_zero_offsetM5Base1FviE([2 x i64] %{{[^,)]+}})
// OGCG: %[[ARG_ADDR:.*]] = alloca { i64, i64 }
// OGCG: store { i64, i64 } %{{.*}}, ptr %[[ARG_ADDR]]
// OGCG-X86: %[[RET:.*]] = load { i64, i64 }, ptr %[[ARG_ADDR]]
@@ -169,22 +171,25 @@ DerivedMemFunc base_to_derived(Base2MemFunc ptr) {
// CIR-BEFORE: %{{.*}} = cir.derived_method %[[PTR]][16] : !cir.method<!cir.func<(!cir.ptr<!rec_Base2>, !s32i)> in !rec_Base2> -> !cir.method<!cir.func<(!cir.ptr<!rec_Derived>, !s32i)> in !rec_Derived>
// CIR-AFTER: cir.func {{.*}} @_Z15base_to_derivedM5Base2FviE
-// CIR-AFTER: %[[PTR:.*]] = cir.load{{.*}} %{{.*}} : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
+// CIR-AFTER: cir.store %{{.*}}, %[[PTR_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR-AFTER: %[[PTR:.*]] = cir.load{{.*}} %[[PTR_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: %[[OFFSET:.*]] = cir.extract_member %[[PTR]][1] : !rec_anon_struct -> !s64i
// CIR-AFTER-X86: %[[OFFSET_ADJ:.*]] = cir.const #cir.int<16> : !s64i
// CIR-AFTER-ARM: %[[OFFSET_ADJ:.*]] = cir.const #cir.int<32> : !s64i
// CIR-AFTER: %[[BINOP_KIND:.*]] = cir.add nsw %[[OFFSET]], %[[OFFSET_ADJ]] : !s64i
// CIR-AFTER: %{{.*}} = cir.insert_member %[[PTR]][1], %[[BINOP_KIND]] : !rec_anon_struct, !s64i
-// LLVM: define {{.*}} { i64, i64 } @_Z15base_to_derivedM5Base2FviE
-// LLVM: %[[ARG:.*]] = load { i64, i64 }, ptr %{{.*}}
+// LLVM-X86: define dso_local { i64, i64 } @_Z15base_to_derivedM5Base2FviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// LLVM-ARM: define dso_local { i64, i64 } @_Z15base_to_derivedM5Base2FviE({ i64, i64 } %{{[^,)]+}})
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[ARG_ADDR:.*]], align 8
+// LLVM: %[[ARG:.*]] = load { i64, i64 }, ptr %[[ARG_ADDR]]
// LLVM: %[[ADJ:.*]] = extractvalue { i64, i64 } %[[ARG]], 1
// LLVM-X86: %[[ADJ_ADJ:.*]] = add nsw i64 %[[ADJ]], 16
// LLVM-ARM: %[[ADJ_ADJ:.*]] = add nsw i64 %[[ADJ]], 32
// LLVM: %{{.*}} = insertvalue { i64, i64 } %[[ARG]], i64 %[[ADJ_ADJ]], 1
-// OGCG-X86: define {{.*}} { i64, i64 } @_Z15base_to_derivedM5Base2FviE
-// OGCG-ARM: define {{.*}} [2 x i64] @_Z15base_to_derivedM5Base2FviE
+// OGCG-X86: define dso_local { i64, i64 } @_Z15base_to_derivedM5Base2FviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// OGCG-ARM: define dso_local [2 x i64] @_Z15base_to_derivedM5Base2FviE([2 x i64] %{{[^,)]+}})
// OGCG: %[[ARG:.*]] = load { i64, i64 }, ptr %{{.*}}
// OGCG: store { i64, i64 } %[[ARG]], ptr %[[ARG_ADDR:.*]]
// OGCG: %[[ARG1:.*]] = load { i64, i64 }, ptr %[[ARG_ADDR]]
@@ -210,17 +215,16 @@ Base1MemFunc derived_to_base_zero_offset(DerivedMemFunc ptr) {
// CIR-AFTER: %[[RET_VAL:.*]] = cir.load %[[RET]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: cir.return %[[RET_VAL]] : !rec_anon_struct
-// LLVM: define {{.*}} { i64, i64 } @_Z27derived_to_base_zero_offsetM7DerivedFviE
-// LLVM: %[[ARG_ADDR:.*]] = alloca { i64, i64 }
-// LLVM: %[[RET_ADDR:.*]] = alloca { i64, i64 }
-// LLVM: store { i64, i64 } %{{.*}}, ptr %[[ARG_ADDR]]
+// LLVM-X86: define dso_local { i64, i64 } @_Z27derived_to_base_zero_offsetM7DerivedFviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// LLVM-ARM: define dso_local { i64, i64 } @_Z27derived_to_base_zero_offsetM7DerivedFviE({ i64, i64 } %{{[^,)]+}})
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[ARG_ADDR:.*]], align 8
// LLVM: %[[TMP:.*]] = load { i64, i64 }, ptr %[[ARG_ADDR]]
-// LLVM: store { i64, i64 } %[[TMP]], ptr %[[RET_ADDR]]
+// LLVM: store { i64, i64 } %[[TMP]], ptr %[[RET_ADDR:.*]], align 8
// LLVM: %[[RET:.*]] = load { i64, i64 }, ptr %[[RET_ADDR]]
// LLVM: ret { i64, i64 } %[[RET]]
-// OGCG-X86: define {{.*}} { i64, i64 } @_Z27derived_to_base_zero_offsetM7DerivedFviE
-// OGCG-ARM: define {{.*}} [2 x i64] @_Z27derived_to_base_zero_offsetM7DerivedFviE
+// OGCG-X86: define dso_local { i64, i64 } @_Z27derived_to_base_zero_offsetM7DerivedFviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// OGCG-ARM: define dso_local [2 x i64] @_Z27derived_to_base_zero_offsetM7DerivedFviE([2 x i64] %{{[^,)]+}})
// OGCG-ARM: %[[RETVAL:.*]] = alloca { i64, i64 }
// OGCG: %[[ARG_ADDR:.*]] = alloca { i64, i64 }
// OGCG-ARM: %[[ARG_COERCE:.*]] = alloca { i64, i64 }
@@ -240,22 +244,25 @@ Base2MemFunc derived_to_base(DerivedMemFunc ptr) {
// CIR-BEFORE: %{{.*}} = cir.base_method %[[PTR]][16] : !cir.method<!cir.func<(!cir.ptr<!rec_Derived>, !s32i)> in !rec_Derived> -> !cir.method<!cir.func<(!cir.ptr<!rec_Base2>, !s32i)> in !rec_Base2>
// CIR-AFTER: cir.func {{.*}} @_Z15derived_to_baseM7DerivedFviE
-// CIR-AFTER: %[[PTR:.*]] = cir.load{{.*}} %{{.*}} : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
+// CIR-AFTER: cir.store %{{.*}}, %[[PTR_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR-AFTER: %[[PTR:.*]] = cir.load{{.*}} %[[PTR_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: %[[OFFSET:.*]] = cir.extract_member %[[PTR]][1] : !rec_anon_struct -> !s64i
// CIR-AFTER-X86: %[[OFFSET_ADJ:.*]] = cir.const #cir.int<16> : !s64i
// CIR-AFTER-ARM: %[[OFFSET_ADJ:.*]] = cir.const #cir.int<32> : !s64i
// CIR-AFTER: %[[BINOP_KIND:.*]] = cir.sub nsw %[[OFFSET]], %[[OFFSET_ADJ]] : !s64i
// CIR-AFTER: %{{.*}} = cir.insert_member %[[PTR]][1], %[[BINOP_KIND]] : !rec_anon_struct, !s64i
-// LLVM: define {{.*}} { i64, i64 } @_Z15derived_to_baseM7DerivedFviE
-// LLVM: %[[ARG:.*]] = load { i64, i64 }, ptr %{{.*}}
+// LLVM-X86: define dso_local { i64, i64 } @_Z15derived_to_baseM7DerivedFviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// LLVM-ARM: define dso_local { i64, i64 } @_Z15derived_to_baseM7DerivedFviE({ i64, i64 } %{{[^,)]+}})
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[ARG_ADDR:.*]], align 8
+// LLVM: %[[ARG:.*]] = load { i64, i64 }, ptr %[[ARG_ADDR]]
// LLVM: %[[ADJ:.*]] = extractvalue { i64, i64 } %[[ARG]], 1
// LLVM-X86: %[[ADJ_ADJ:.*]] = sub nsw i64 %[[ADJ]], 16
// LLVM-ARM: %[[ADJ_ADJ:.*]] = sub nsw i64 %[[ADJ]], 32
// LLVM: %{{.*}} = insertvalue { i64, i64 } %[[ARG]], i64 %[[ADJ_ADJ]], 1
-// OGCG-X86: define {{.*}} { i64, i64 } @_Z15derived_to_baseM7DerivedFviE
-// OGCG-ARM: define {{.*}} [2 x i64] @_Z15derived_to_baseM7DerivedFviE
+// OGCG-X86: define dso_local { i64, i64 } @_Z15derived_to_baseM7DerivedFviE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// OGCG-ARM: define dso_local [2 x i64] @_Z15derived_to_baseM7DerivedFviE([2 x i64] %{{[^,)]+}})
// OGCG: %[[ARG:.*]] = load { i64, i64 }, ptr %{{.*}}
// OGCG: store { i64, i64 } %[[ARG]], ptr %[[ARG_ADDR:.*]]
// OGCG: %[[ARG1:.*]] = load { i64, i64 }, ptr %[[ARG_ADDR]]
diff --git a/clang/test/CIR/CodeGen/pointer-to-member-func-cmp.cpp b/clang/test/CIR/CodeGen/pointer-to-member-func-cmp.cpp
index b7bcc31573c05..65c68a73b78ca 100644
--- a/clang/test/CIR/CodeGen/pointer-to-member-func-cmp.cpp
+++ b/clang/test/CIR/CodeGen/pointer-to-member-func-cmp.cpp
@@ -31,8 +31,10 @@ bool cmp_eq(void (Foo::*lhs)(int), void (Foo::*rhs)(int)) {
// CIR-BEFORE: cir.store %[[CMP]], %{{.*}} : !cir.bool, !cir.ptr<!cir.bool>
// CIR-AFTER: @_Z6cmp_eqM3FooFviES1_
-// CIR-AFTER: %[[LHS:.*]] = cir.load{{.*}} %0 : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
-// CIR-AFTER: %[[RHS:.*]] = cir.load{{.*}} %1 : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
+// CIR-AFTER: cir.store %{{.*}}, %[[LHS_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR-AFTER: cir.store %{{.*}}, %[[RHS_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR-AFTER: %[[LHS:.*]] = cir.load{{.*}} %[[LHS_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
+// CIR-AFTER: %[[RHS:.*]] = cir.load{{.*}} %[[RHS_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: %[[NULL:.*]] = cir.const #cir.int<0> : !s64i
// CIR-AFTER: %[[LHS_PTR:.*]] = cir.extract_member %[[LHS]][0] : !rec_anon_struct -> !s64i
// CIR-AFTER: %[[RHS_PTR:.*]] = cir.extract_member %[[RHS]][0] : !rec_anon_struct -> !s64i
@@ -50,9 +52,12 @@ bool cmp_eq(void (Foo::*lhs)(int), void (Foo::*rhs)(int)) {
// CIR-AFTER-ARM: %[[TMP:.*]] = cir.or %[[AND_PTR_NULL]], %[[ADJ_CMP]] : !cir.bool
// CIR-AFTER: %[[RESULT:.*]] = cir.and %[[PTR_CMP]], %[[TMP]] : !cir.bool
-// LLVM: define {{.*}} i1 @_Z6cmp_eqM3FooFviES1_
-// LLVM: %[[LHS:.*]] = load { i64, i64 }, ptr %{{.+}}
-// LLVM: %[[RHS:.*]] = load { i64, i64 }, ptr %{{.+}}
+// LLVM-X86: define dso_local noundef zeroext i1 @_Z6cmp_eqM3FooFviES1_(i64 %{{[^,)]+}}, i64 %{{[^,)]+}}, i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// LLVM-ARM: define dso_local noundef i1 @_Z6cmp_eqM3FooFviES1_({ i64, i64 } %{{[^,)]+}}, { i64, i64 } %{{[^,)]+}})
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[LHS_ADDR:.*]], align 8
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[RHS_ADDR:.*]], align 8
+// LLVM: %[[LHS:.*]] = load { i64, i64 }, ptr %[[LHS_ADDR]]
+// LLVM: %[[RHS:.*]] = load { i64, i64 }, ptr %[[RHS_ADDR]]
// LLVM: %[[LHS_PTR:.*]] = extractvalue { i64, i64 } %[[LHS]], 0
// LLVM: %[[RHS_PTR:.*]] = extractvalue { i64, i64 } %[[RHS]], 0
// LLVM: %[[PTR_CMP:.*]] = icmp eq i64 %[[LHS_PTR]], %[[RHS_PTR]]
@@ -68,7 +73,8 @@ bool cmp_eq(void (Foo::*lhs)(int), void (Foo::*rhs)(int)) {
// LLVM-ARM: %[[TMP:.*]] = or i1 %[[AND_PTR_NULL]], %[[ADJ_CMP]]
// LLVM: %[[RESULT:.*]] = and i1 %[[PTR_CMP]], %[[TMP]]
-// OGCG: define {{.*}} i1 @_Z6cmp_eqM3FooFviES1_
+// OGCG-X86: define dso_local noundef zeroext i1 @_Z6cmp_eqM3FooFviES1_(i64 %{{[^,)]+}}, i64 %{{[^,)]+}}, i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// OGCG-ARM: define dso_local noundef i1 @_Z6cmp_eqM3FooFviES1_([2 x i64] %{{[^,)]+}}, [2 x i64] %{{[^,)]+}})
// OGCG: %[[LHS_TMP:.*]] = alloca { i64, i64 }
// OGCG: %[[RHS_TMP:.*]] = alloca { i64, i64 }
// OGCG: %[[LHS_ADDR:.*]] = alloca { i64, i64 }
@@ -101,8 +107,10 @@ bool cmp_ne(void (Foo::*lhs)(int), void (Foo::*rhs)(int)) {
// CIR-BEFORE: cir.store %[[CMP]], %{{.*}} : !cir.bool, !cir.ptr<!cir.bool>
// CIR-AFTER: cir.func {{.*}} @_Z6cmp_neM3FooFviES1_
-// CIR-AFTER: %[[LHS:.*]] = cir.load{{.*}} %0 : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
-// CIR-AFTER: %[[RHS:.*]] = cir.load{{.*}} %1 : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
+// CIR-AFTER: cir.store %{{.*}}, %[[LHS_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR-AFTER: cir.store %{{.*}}, %[[RHS_ADDR:.*]] : !rec_anon_struct, !cir.ptr<!rec_anon_struct>
+// CIR-AFTER: %[[LHS:.*]] = cir.load{{.*}} %[[LHS_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
+// CIR-AFTER: %[[RHS:.*]] = cir.load{{.*}} %[[RHS_ADDR]] : !cir.ptr<!rec_anon_struct>, !rec_anon_struct
// CIR-AFTER: %[[NULL:.*]] = cir.const #cir.int<0> : !s64i
// CIR-AFTER: %[[LHS_PTR:.*]] = cir.extract_member %[[LHS]][0] : !rec_anon_struct -> !s64i
// CIR-AFTER: %[[RHS_PTR:.*]] = cir.extract_member %[[RHS]][0] : !rec_anon_struct -> !s64i
@@ -120,9 +128,12 @@ bool cmp_ne(void (Foo::*lhs)(int), void (Foo::*rhs)(int)) {
// CIR-AFTER-ARM: %[[TMP:.*]] = cir.and %[[AND_PTR_NULL]], %[[ADJ_CMP]] : !cir.bool
// CIR-AFTER: %[[RESULT:.*]] = cir.or %[[PTR_CMP]], %[[TMP]] : !cir.bool
-// LLVM: define {{.*}} i1 @_Z6cmp_neM3FooFviES1_
-// LLVM: %[[LHS:.*]] = load { i64, i64 }, ptr %{{.*}}
-// LLVM: %[[RHS:.*]] = load { i64, i64 }, ptr %{{.*}}
+// LLVM-X86: define dso_local noundef zeroext i1 @_Z6cmp_neM3FooFviES1_(i64 %{{[^,)]+}}, i64 %{{[^,)]+}}, i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// LLVM-ARM: define dso_local noundef i1 @_Z6cmp_neM3FooFviES1_({ i64, i64 } %{{[^,)]+}}, { i64, i64 } %{{[^,)]+}})
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[LHS_ADDR:.*]], align 8
+// LLVM: store { i64, i64 } %{{.*}}, ptr %[[RHS_ADDR:.*]], align 8
+// LLVM: %[[LHS:.*]] = load { i64, i64 }, ptr %[[LHS_ADDR]]
+// LLVM: %[[RHS:.*]] = load { i64, i64 }, ptr %[[RHS_ADDR]]
// LLVM: %[[LHS_PTR:.*]] = extractvalue { i64, i64 } %[[LHS]], 0
// LLVM: %[[RHS_PTR:.*]] = extractvalue { i64, i64 } %[[RHS]], 0
// LLVM: %[[PTR_CMP:.*]] = icmp ne i64 %[[LHS_PTR]], %[[RHS_PTR]]
@@ -138,7 +149,8 @@ bool cmp_ne(void (Foo::*lhs)(int), void (Foo::*rhs)(int)) {
// LLVM-ARM: %[[TMP:.*]] = and i1 %[[AND_PTR_NULL]], %[[ADJ_CMP]]
// LLVM: %[[RESULT:.*]] = or i1 %[[PTR_CMP]], %[[TMP]]
-// OGCG: define {{.*}} i1 @_Z6cmp_neM3FooFviES1_
+// OGCG-X86: define dso_local noundef zeroext i1 @_Z6cmp_neM3FooFviES1_(i64 %{{[^,)]+}}, i64 %{{[^,)]+}}, i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
+// OGCG-ARM: define dso_local noundef i1 @_Z6cmp_neM3FooFviES1_([2 x i64] %{{[^,)]+}}, [2 x i64] %{{[^,)]+}})
// OGCG: %[[LHS_TMP:.*]] = alloca { i64, i64 }
// OGCG: %[[RHS_TMP:.*]] = alloca { i64, i64 }
// OGCG: %[[LHS_ADDR:.*]] = alloca { i64, i64 }
diff --git a/clang/test/CIR/CodeGen/record-type-metadata.cpp b/clang/test/CIR/CodeGen/record-type-metadata.cpp
index 46f823bce96b2..2e799782e01c1 100644
--- a/clang/test/CIR/CodeGen/record-type-metadata.cpp
+++ b/clang/test/CIR/CodeGen/record-type-metadata.cpp
@@ -1,4 +1,7 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class and padded, packed, and
+// over-aligned record shapes.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
struct Trivial { int x, y; };
diff --git a/clang/test/CIR/CodeGen/ret-attrs.cpp b/clang/test/CIR/CodeGen/ret-attrs.cpp
index 472b8cf5c20fd..f9e525d930d56 100644
--- a/clang/test/CIR/CodeGen/ret-attrs.cpp
+++ b/clang/test/CIR/CodeGen/ret-attrs.cpp
@@ -17,7 +17,7 @@ using MemPtrTy = void (Struct::*)();
MemPtrTy not_noundef_memptr(MemPtrTy t){}
// CIR: cir.func no_inline dso_local @_Z18not_noundef_memptrM6StructFvvE({{.*}}) -> !rec_anon_struct attributes {{{.*}}nothrow} {
-// LLVM: define dso_local { i64, i64 } @_Z18not_noundef_memptrM6StructFvvE({{.*}})
+// LLVM: define dso_local { i64, i64 } @_Z18not_noundef_memptrM6StructFvvE(i64 %{{[^,)]+}}, i64 %{{[^,)]+}})
void not_noundef_void(){}
// CIR: cir.func no_inline dso_local @_Z16not_noundef_voidv()
@@ -52,8 +52,10 @@ void calls(MemPtrTy mpt) {
// LLVM: call void @_Z16not_noundef_voidv()
not_noundef_memptr(mpt);
- // CIR: cir.call @_Z18not_noundef_memptrM6StructFvvE(%2) : (!rec_anon_struct) -> !rec_anon_struct
- // LLVM: call { i64, i64 } @_Z18not_noundef_memptrM6StructFvvE({{.*}})
+ // A member function pointer is two eightbytes, so it is expanded into a
+ // pair of i64 arguments.
+ // CIR: cir.call @_Z18not_noundef_memptrM6StructFvvE(%{{.+}}, %{{.+}}) : (!s64i, !s64i) -> !rec_anon_struct
+ // LLVM: call { i64, i64 } @_Z18not_noundef_memptrM6StructFvvE(i64 %{{.+}}, i64 %{{.+}})
has_noundef_ref();
// CIR: cir.call @_Z15has_noundef_refv() : () -> (!cir.ptr<!s32i> {llvm.align = 4 : i64, llvm.dereferenceable = 4 : i64, llvm.nonnull, llvm.noundef})
diff --git a/clang/test/CIR/CodeGen/struct.cpp b/clang/test/CIR/CodeGen/struct.cpp
index ceed62cd6234f..76f1c6c638c1d 100644
--- a/clang/test/CIR/CodeGen/struct.cpp
+++ b/clang/test/CIR/CodeGen/struct.cpp
@@ -340,6 +340,9 @@ void calling_function_with_default_values() {
function_arg_with_default_value();
}
+// CompleteS is 8 bytes of INTEGER class, so it is passed as one i64 out of a
+// coerce slot.
+// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_CompleteS>
// CIR: %[[AGG_ADDR:.*]] = cir.alloca "agg.tmp0" {{.*}} : !cir.ptr<!rec_CompleteS>
// CIR: %[[ELEM_0_PTR:.*]] = cir.get_member %[[AGG_ADDR]][0] {name = "a"} : !cir.ptr<!rec_CompleteS> -> !cir.ptr<!s32i>
// CIR: %[[CONST_1:.*]] = cir.const #cir.int<1> : !s32i
@@ -348,17 +351,21 @@ void calling_function_with_default_values() {
// CIR: %[[CONST_2:.*]] = cir.const #cir.int<2> : !s8i
// CIR: cir.store{{.*}} %[[CONST_2]], %[[ELEM_1_PTR]] : !s8i, !cir.ptr<!s8i>
// CIR: %[[TMP_AGG:.*]] = cir.load{{.*}} %[[AGG_ADDR]] : !cir.ptr<!rec_CompleteS>, !rec_CompleteS
-// CIR: cir.call @_Z31function_arg_with_default_value9CompleteS(%[[TMP_AGG]]) : (!rec_CompleteS) -> ()
-
-// TODO(CIR): the difference between the CIR LLVM and OGCG is because the lack of calling convention lowering,
+// CIR: cir.store %[[TMP_AGG]], %[[COERCE]] : !rec_CompleteS, !cir.ptr<!rec_CompleteS>
+// CIR: %[[COERCE_PTR:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_CompleteS> -> !cir.ptr<!u64i>
+// CIR: %[[ARG:.*]] = cir.load %[[COERCE_PTR]] : !cir.ptr<!u64i>, !u64i
+// CIR: cir.call @_Z31function_arg_with_default_value9CompleteS(%[[ARG]]) : (!u64i) -> ()
+// LLVM: %[[COERCE:.*]] = alloca %struct.CompleteS, i64 1, align 8
// LLVM: %[[AGG_ADDR:.*]] = alloca %struct.CompleteS, i64 1, align 4
// LLVM: %[[ELEM_0_PTR:.*]] = getelementptr inbounds nuw %struct.CompleteS, ptr %[[AGG_ADDR]], i32 0, i32 0
// LLVM: store i32 1, ptr %[[ELEM_0_PTR]], align 4
// LLVM: %[[ELEM_1_PTR:.*]] = getelementptr inbounds nuw %struct.CompleteS, ptr %[[AGG_ADDR]], i32 0, i32 1
// LLVM: store i8 2, ptr %[[ELEM_1_PTR]], align 4
// LLVM: %[[TMP_AGG:.*]] = load %struct.CompleteS, ptr %[[AGG_ADDR]], align 4
-// LLVM: call void @_Z31function_arg_with_default_value9CompleteS(%struct.CompleteS %[[TMP_AGG]])
+// LLVM: store %struct.CompleteS %[[TMP_AGG]], ptr %[[COERCE]], align 4
+// LLVM: %[[ARG:.*]] = load i64, ptr %[[COERCE]], align 8
+// LLVM: call void @_Z31function_arg_with_default_value9CompleteS(i64 %[[ARG]])
// OGCG: %[[AGG_ADDR:.*]] = alloca %struct.CompleteS, align 4
// OGCG: %[[ELEM_0_PTR:.*]] = getelementptr inbounds nuw %struct.CompleteS, ptr %[[AGG_ADDR]], i32 0, i32 0
diff --git a/clang/test/CIR/CodeGen/temp-param-obj-decl.cpp b/clang/test/CIR/CodeGen/temp-param-obj-decl.cpp
index 2c3c50a2edb67..fe9f418ffa2d0 100644
--- a/clang/test/CIR/CodeGen/temp-param-obj-decl.cpp
+++ b/clang/test/CIR/CodeGen/temp-param-obj-decl.cpp
@@ -47,11 +47,13 @@ HasMem get_m() { return m; }
// CIR: %[[GET_GLOB:.*]] = cir.get_global @_ZTAXtl6HasMemLi2EEE : !cir.ptr<!rec_HasMem>
// CIR: cir.copy %[[GET_GLOB]] align(4) to %[[RET_ALLOCA]] align(4) : !cir.ptr<!rec_HasMem>
//
-// LLVM-BOTH-LABEL: define {{.*}}@_Z5get_mIXtl6HasMemLi2EEEES0_v()
-// LLVM-BOTH: %[[RET_ALLOCA:.*]] = alloca %struct.HasMem
-// LLVM-BOTH: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}}%[[RET_ALLOCA]], ptr {{.*}}@_ZTAXtl6HasMemLi2EEE, i64 4, i1 false)
+// A single-int record fits in one eightbyte, so it is returned as i32.
+// LLVM-BOTH-LABEL: define linkonce_odr i32 @_Z5get_mIXtl6HasMemLi2EEEES0_v()
+// LLVM-BOTH: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}}%[[RET_ALLOCA:.*]], ptr {{.*}}@_ZTAXtl6HasMemLi2EEE, i64 4, i1 false)
// LLVM: %[[LOAD_RET:.*]] = load %struct.HasMem, ptr %[[RET_ALLOCA]]
-// LLVM: ret %struct.HasMem %[[LOAD_RET]]
+// LLVM: store %struct.HasMem %[[LOAD_RET]], ptr %[[COERCE:.*]], align 4
+// LLVM: %[[TO_RET:.*]] = load i32, ptr %[[COERCE]]
+// LLVM: ret i32 %[[TO_RET]]
// OGCG: %[[COERCE:.*]] = getelementptr{{.*}} %struct.HasMem, ptr %[[RET_ALLOCA]], i32 0, i32 0
// OGCG: %[[TO_RET:.*]] = load i32, ptr %[[COERCE]]
diff --git a/clang/test/CIR/CodeGen/ternary-throw.cpp b/clang/test/CIR/CodeGen/ternary-throw.cpp
index 14b835903f8bd..fc3b2ada38218 100644
--- a/clang/test/CIR/CodeGen/ternary-throw.cpp
+++ b/clang/test/CIR/CodeGen/ternary-throw.cpp
@@ -1034,6 +1034,7 @@ void test_agg_arg_throw(bool c) {
}
// CIR-LABEL: cir.func{{.*}} @_Z18test_agg_arg_throwb(
+// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_Agg>
// CIR: %[[TMP:.*]] = cir.alloca "agg.tmp0" {{.*}} : !cir.ptr<!rec_Agg>
// CIR: cir.if %{{.*}} {
// CIR: %[[EXC:.*]] = cir.alloc.exception{{.*}} -> !cir.ptr<!s32i>
@@ -1043,8 +1044,11 @@ void test_agg_arg_throw(bool c) {
// CIR: cir.get_member %[[TMP]][0] {name = "x"}
// CIR: cir.get_member %[[TMP]][1] {name = "y"}
// CIR: }
-// CIR: %[[ARG:.*]] = cir.load{{.*}} %[[TMP]] : !cir.ptr<!rec_Agg>, !rec_Agg
-// CIR: cir.call @_Z4take3Agg(%[[ARG]])
+// CIR: %[[AGG:.*]] = cir.load{{.*}} %[[TMP]] : !cir.ptr<!rec_Agg>, !rec_Agg
+// CIR: cir.store %[[AGG]], %[[COERCE]] : !rec_Agg, !cir.ptr<!rec_Agg>
+// CIR: %[[COERCE_PTR:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_Agg> -> !cir.ptr<!u64i>
+// CIR: %[[ARG:.*]] = cir.load %[[COERCE_PTR]] : !cir.ptr<!u64i>, !u64i
+// CIR: cir.call @_Z4take3Agg(%[[ARG]]) : (!u64i) -> ()
// LLVM-LABEL: define{{.*}} void @_Z18test_agg_arg_throwb(
// LLVM: br i1 %{{.*}}, label %[[TRUE_BB:.*]], label %[[FALSE_BB:.*]]
diff --git a/clang/test/CIR/CodeGen/three-way-cmp.cpp b/clang/test/CIR/CodeGen/three-way-cmp.cpp
index feb1da8578792..ac06a66d3e8d0 100644
--- a/clang/test/CIR/CodeGen/three-way-cmp.cpp
+++ b/clang/test/CIR/CodeGen/three-way-cmp.cpp
@@ -1,10 +1,12 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before.cir
// RUN: FileCheck %s --input-file=%t-before.cir --check-prefix=BEFORE,BOTH
// RUN: FileCheck %s --input-file=%t.cir --check-prefix=AFTER
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -emit-cir -mmlir --mlir-print-ir-after=cir-lowering-prepare %s -o %t.cir 2>&1 | FileCheck %s -check-prefix=AFTER,BOTH
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-after=cir-lowering-prepare %s -o %t.cir 2>&1 | FileCheck %s -check-prefix=AFTER,BOTH
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -emit-llvm %s -o %t.ll 2>&1
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll 2>&1
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -emit-llvm %s -o %t-og.ll 2>&1
diff --git a/clang/test/CIR/CodeGen/thunks.cpp b/clang/test/CIR/CodeGen/thunks.cpp
index e44a1f9a90dd4..cfa5aa242cb31 100644
--- a/clang/test/CIR/CodeGen/thunks.cpp
+++ b/clang/test/CIR/CodeGen/thunks.cpp
@@ -250,19 +250,18 @@ void C::f(int x, ...) {}
// CIR: cir.func {{.*}} @_ZN5Test51C1hEv
-// CIR: cir.func {{.*}} @_ZThn8_N5Test51C1hEv(%arg0: !cir.ptr<
+// A non-trivial class is returned indirectly, so the thunk forwards the sret
+// pointer it was given straight to the callee.
+// CIR: cir.func {{.*}} @_ZThn8_N5Test51C1hEv(%arg0: !cir.ptr<!rec_Test53A3ANonTrivial> {{.*}}llvm.sret = !rec_Test53A3ANonTrivial{{.*}}, %arg1: !cir.ptr<
// CIR: %[[T5_THIS_ADDR:.*]] = cir.alloca "this" {{.*}} init
-// CIR: %[[T5_RETVAL:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<!rec_Test53A3ANonTrivial>
-// CIR: cir.store %arg0, %[[T5_THIS_ADDR]]
+// CIR: cir.store %arg1, %[[T5_THIS_ADDR]]
// CIR: %[[T5_THIS:.*]] = cir.load %[[T5_THIS_ADDR]]
// CIR: %[[T5_CAST:.*]] = cir.cast bitcast %[[T5_THIS]] : !cir.ptr<{{.*}}> -> !cir.ptr<!u8i>
// CIR: %[[T5_OFFSET:.*]] = cir.const #cir.int<-8> : !s64i
// CIR: %[[T5_ADJUSTED:.*]] = cir.ptr_stride %[[T5_CAST]], %[[T5_OFFSET]]
// CIR: %[[T5_RESULT:.*]] = cir.cast bitcast %[[T5_ADJUSTED]] : !cir.ptr<!u8i> -> !cir.ptr<
-// CIR: %[[T5_CALL:.*]] = cir.call @_ZN5Test51C1hEv(%[[T5_RESULT]]){{.*}} -> !rec_Test5{{.*}}NonTrivial
-// CIR: cir.store {{.*}} %[[T5_CALL]], %[[T5_RETVAL]]
-// CIR: %[[T5_RET_VAL:.*]] = cir.load %[[T5_RETVAL]]
-// CIR: cir.return %[[T5_RET_VAL]]
+// CIR: cir.call @_ZN5Test51C1hEv(%arg0, %[[T5_RESULT]])
+// CIR: cir.return
// CIR-NOT: cir.trap
// CIR-NOT: cir.unreachable
@@ -336,13 +335,11 @@ void C::f(int x, ...) {}
// LLVM: %[[L4_ARG:.*]] = load i32, ptr
// LLVM: call void @_ZN5Test41C1gEi(ptr{{.*}} %[[L4_ADJ]], i32{{.*}} %[[L4_ARG]])
-// LLVM: define {{.*}} %"struct.Test5::NonTrivial" @_ZThn8_N5Test51C1hEv(ptr{{.*}})
+// LLVM: define {{.*}} void @_ZThn8_N5Test51C1hEv(ptr dead_on_unwind noalias writable sret(%"struct.Test5::NonTrivial") align 4 %[[L5_AGG:[^,)]+]], ptr{{[^,)]*}})
// LLVM: %[[L5_THIS:.*]] = load ptr, ptr
// LLVM: %[[L5_ADJ:.*]] = getelementptr i8, ptr %[[L5_THIS]], i64 -8
-// LLVM: %[[L5_RET:.*]] = call{{.*}} %"struct.Test5::NonTrivial" @_ZN5Test51C1hEv(ptr{{.*}} %[[L5_ADJ]])
-// LLVM: store %"struct.Test5::NonTrivial" %[[L5_RET]], ptr
-// LLVM: load %"struct.Test5::NonTrivial", ptr
-// LLVM: ret %"struct.Test5::NonTrivial"
+// LLVM: call void @_ZN5Test51C1hEv(ptr dead_on_unwind writable sret(%"struct.Test5::NonTrivial") align 4 %[[L5_AGG]], ptr{{.*}} %[[L5_ADJ]])
+// LLVM: ret void
// LLVM-LABEL: define {{.*}} @_ZTch0_v0_n32_N15CovariantReturn1C1fEv
// LLVM: call {{.*}} @_ZN15CovariantReturn1C1fEv
diff --git a/clang/test/CIR/CodeGen/trivial-abi.cpp b/clang/test/CIR/CodeGen/trivial-abi.cpp
index af2bcc7098e28..a561868bbb33e 100644
--- a/clang/test/CIR/CodeGen/trivial-abi.cpp
+++ b/clang/test/CIR/CodeGen/trivial-abi.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports padded, packed, and over-aligned record shapes.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp b/clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp
index e308d22256063..36e44bdb78cad 100644
--- a/clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp
+++ b/clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp
@@ -1,8 +1,10 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: cir-opt %t.cir -cir-flatten-cfg -o %t-flat.cir
// RUN: FileCheck --input-file=%t-flat.cir %s -check-prefix=CIR-FLAT
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/try-catch-non-trivial-copy.cpp b/clang/test/CIR/CodeGen/try-catch-non-trivial-copy.cpp
index 9e3f627acbea1..d4fe1ebc20e0c 100644
--- a/clang/test/CIR/CodeGen/try-catch-non-trivial-copy.cpp
+++ b/clang/test/CIR/CodeGen/try-catch-non-trivial-copy.cpp
@@ -1,10 +1,12 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: cir-opt -cir-hoist-allocas -cir-flatten-cfg %t.cir -o %t.flat.cir
// RUN: FileCheck --input-file=%t.flat.cir %s -check-prefix=CIR-FLAT
// RUN: cir-opt -cir-hoist-allocas -cir-flatten-cfg -cir-eh-abi-lowering %t.cir -o %t.eh.cir
// RUN: FileCheck --input-file=%t.eh.cir %s -check-prefix=CIR-AFTER-EHABI
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/try-catch.cpp b/clang/test/CIR/CodeGen/try-catch.cpp
index 3776f4a1292c6..816f03e2901a6 100644
--- a/clang/test/CIR/CodeGen/try-catch.cpp
+++ b/clang/test/CIR/CodeGen/try-catch.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/try-no-throwing-calls.cpp b/clang/test/CIR/CodeGen/try-no-throwing-calls.cpp
index db44c2a4e483c..dff7d8c400fd8 100644
--- a/clang/test/CIR/CodeGen/try-no-throwing-calls.cpp
+++ b/clang/test/CIR/CodeGen/try-no-throwing-calls.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/unary.cpp b/clang/test/CIR/CodeGen/unary.cpp
index d2eaa0316024d..e6f5046df4a73 100644
--- a/clang/test/CIR/CodeGen/unary.cpp
+++ b/clang/test/CIR/CodeGen/unary.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -Wno-unused-value -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the !cir.long_double wrapper and the f16 and f128 types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -Wno-unused-value -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -Wno-unused-value -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -Wno-unused-value -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/union-agg-init.c b/clang/test/CIR/CodeGen/union-agg-init.c
index 5e32480d71d6b..4862b09d90b12 100644
--- a/clang/test/CIR/CodeGen/union-agg-init.c
+++ b/clang/test/CIR/CodeGen/union-agg-init.c
@@ -17,8 +17,10 @@ typedef union vec3 {
// In C mode, this does do zero padding.
vec3 ret_vec3() {
- // CIR-LABEL: ret_vec3
- // CIR: %[[RET_ALLOCA:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<!rec_vec3>
+ // A 24-byte union does not fit in registers, so it is returned through an
+ // sret pointer and the members are written directly into it.
+ // CIR-LABEL: cir.func {{.*}} @ret_vec3
+ // CIR-SAME: (%[[RET_ALLOCA:.*]]: !cir.ptr<!rec_vec3> {{.*}}llvm.sret = !rec_vec3{{.*}})
// CIR: %[[GET_ANON:.*]] = cir.get_member %[[RET_ALLOCA]][0] {name = ""}
// CIR: %[[GET_X:.*]] = cir.get_member %[[GET_ANON]][0] {name = "x"}
// CIR: %[[FIVE:.*]] = cir.const #cir.fp<5.{{.*}}> : !cir.double
@@ -30,9 +32,8 @@ vec3 ret_vec3() {
// CIR: %[[ZERO:.*]] = cir.const #cir.fp<0.{{.*}}> : !cir.double
// CIR: cir.store{{.*}} %[[ZERO]], %[[GET_Z]]
- // LLVM-LABEL: ret_vec3
- // OGCG-SAME: ptr{{.*}}sret(%union.vec3){{.*}}%[[RET_ALLOCA:.*]])
- // LLVMCIR: %[[RET_ALLOCA:.*]] = alloca %union.vec3
+ // LLVM-LABEL: define dso_local void @ret_vec3
+ // LLVM-SAME: (ptr dead_on_unwind noalias writable sret(%union.vec3) align 8 %[[RET_ALLOCA:.*]])
// LLVM: %[[GET_X:.*]] = getelementptr {{.*}}, ptr %[[RET_ALLOCA]], i32 0, i32 0
// LLVM: store double 5{{.*}}, ptr %[[GET_X]]
// LLVM: %[[GET_Y:.*]] = getelementptr {{.*}}, ptr %[[RET_ALLOCA]], i32 0, i32 1
@@ -60,7 +61,13 @@ struct outer ret_outer() {
// CIR: %[[GET_GLOB:.*]] = cir.get_global @__const.ret_outer.__retval : !cir.ptr<!rec_outer>
// CIR: cir.copy %[[GET_GLOB]] to %[[RET_ALLOCA]] : !cir.ptr<!rec_outer>
- // LLVM-LABEL: ret_outer
- // LLVM: %[[RET_ALLOCA:.*]] = alloca %struct.outer
- // LLVM: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}}%[[RET_ALLOCA]], ptr {{.*}}@__const.ret_outer.{{.*}}, i64 16, i1 false)
+ // A 16-byte record spans two eightbytes, so it is returned in a register
+ // pair.
+ // LLVM-LABEL: define dso_local { i64, i32 } @ret_outer()
+ // LLVM: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}}%[[RET_ALLOCA:.*]], ptr {{.*}}@__const.ret_outer.{{.*}}, i64 16, i1 false)
+ // LLVMCIR: %[[OUTER:.*]] = load %struct.outer, ptr %[[RET_ALLOCA]]
+ // LLVMCIR: store %struct.outer %[[OUTER]], ptr %[[COERCE:.*]], align 8
+ // LLVMCIR: %[[RET:.*]] = load { i64, i32 }, ptr %[[COERCE]]
+ // OGCG: %[[RET:.*]] = load { i64, i32 }, ptr %[[RET_ALLOCA]]
+ // LLVM: ret { i64, i32 } %[[RET]]
}
diff --git a/clang/test/CIR/CodeGen/union-agg-init.cpp b/clang/test/CIR/CodeGen/union-agg-init.cpp
index 7414ece17e765..0c8a7239229fe 100644
--- a/clang/test/CIR/CodeGen/union-agg-init.cpp
+++ b/clang/test/CIR/CodeGen/union-agg-init.cpp
@@ -12,8 +12,10 @@ typedef union vec3 {
// In C++ mode, this doesn't do zero padding.
extern "C" vec3 ret_vec3() {
- // CIR-LABEL: ret_vec3
- // CIR: %[[RET_ALLOCA:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<!rec_vec3>
+ // A 24-byte union does not fit in registers, so it is returned through an
+ // sret pointer and the members are written directly into it.
+ // CIR-LABEL: cir.func {{.*}} @ret_vec3
+ // CIR-SAME: (%[[RET_ALLOCA:.*]]: !cir.ptr<!rec_vec3> {{.*}}llvm.sret = !rec_vec3{{.*}})
// CIR: %[[GET_ANON:.*]] = cir.get_member %[[RET_ALLOCA]][0] {name = ""}
// CIR: %[[GET_X:.*]] = cir.get_member %[[GET_ANON]][0] {name = "x"}
// CIR: %[[FIVE:.*]] = cir.const #cir.fp<5.{{.*}}> : !cir.double
@@ -25,9 +27,8 @@ extern "C" vec3 ret_vec3() {
// CIR: %[[ZERO:.*]] = cir.const #cir.fp<0.{{.*}}> : !cir.double
// CIR: cir.store{{.*}} %[[ZERO]], %[[GET_Z]]
- // LLVM-LABEL: ret_vec3
- // OGCG-SAME: ptr{{.*}}sret(%union.vec3){{.*}}%[[RET_ALLOCA:.*]])
- // LLVMCIR: %[[RET_ALLOCA:.*]] = alloca %union.vec3
+ // LLVM-LABEL: define dso_local void @ret_vec3
+ // LLVM-SAME: (ptr dead_on_unwind noalias writable sret(%union.vec3) align 8 %[[RET_ALLOCA:.*]])
// LLVM: %[[GET_X:.*]] = getelementptr {{.*}}, ptr %[[RET_ALLOCA]], i32 0, i32 0
// LLVM: store double 5{{.*}}, ptr %[[GET_X]]
// LLVM: %[[GET_Y:.*]] = getelementptr {{.*}}, ptr %[[RET_ALLOCA]], i32 0, i32 1
@@ -42,12 +43,26 @@ typedef union Trivial {
} Trivial;
extern "C" Trivial ret_trivial() { return {}; }
- // CIR-LABEL: ret_trivial
+ // A single-int union fits in one eightbyte, so it is returned as i32.
+ // CIR-LABEL: cir.func {{.*}} @ret_trivial() -> !s32i
+ // CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_Trivial>
// CIR: %[[RET_ALLOCA:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<!rec_Trivial>
// CIR: %[[GET_A:.*]] = cir.get_member %[[RET_ALLOCA]][0] {name = "a"}
// CIR: %[[ZERO:.*]] = cir.const #cir.int<0>
// CIR: cir.store{{.*}} %[[ZERO]], %[[GET_A]]
+ // CIR: %[[TRIVIAL:.*]] = cir.load %[[RET_ALLOCA]] : !cir.ptr<!rec_Trivial>, !rec_Trivial
+ // CIR: cir.store %[[TRIVIAL]], %[[COERCE]] : !rec_Trivial, !cir.ptr<!rec_Trivial>
+ // CIR: %[[COERCE_I32:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_Trivial> -> !cir.ptr<!s32i>
+ // CIR: %[[RET:.*]] = cir.load %[[COERCE_I32]] : !cir.ptr<!s32i>, !s32i
+ // CIR: cir.return %[[RET]] : !s32i
- // LLVM-LABEL: ret_trivial
+ // LLVM-LABEL: define dso_local i32 @ret_trivial()
+ // LLVMCIR: %[[COERCE:.*]] = alloca %union.Trivial
// LLVM: %[[RET_ALLOCA:.*]] = alloca %union.Trivial
// LLVM: store i32 0, ptr %[[RET_ALLOCA]]
+ // LLVMCIR: %[[TRIVIAL:.*]] = load %union.Trivial, ptr %[[RET_ALLOCA]]
+ // LLVMCIR: store %union.Trivial %[[TRIVIAL]], ptr %[[COERCE]]
+ // LLVMCIR: %[[RET:.*]] = load i32, ptr %[[COERCE]]
+ // OGCG: %[[COERCE_DIVE:.*]] = getelementptr inbounds nuw %union.Trivial, ptr %[[RET_ALLOCA]], i32 0, i32 0
+ // OGCG: %[[RET:.*]] = load i32, ptr %[[COERCE_DIVE]]
+ // LLVM: ret i32 %[[RET]]
diff --git a/clang/test/CIR/CodeGen/union.c b/clang/test/CIR/CodeGen/union.c
index 28bd9081ca17a..c102a181bbe77 100644
--- a/clang/test/CIR/CodeGen/union.c
+++ b/clang/test/CIR/CodeGen/union.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports padded, packed, and over-aligned record shapes.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/union.cpp b/clang/test/CIR/CodeGen/union.cpp
index dc9b121eeb745..4251c063f5e9b 100644
--- a/clang/test/CIR/CodeGen/union.cpp
+++ b/clang/test/CIR/CodeGen/union.cpp
@@ -27,21 +27,22 @@ void shouldGenerateUnionAccess(union U u) {
u.d = 0.1;
u.d;
}
-// CIR: cir.func {{.*}}shouldGenerateUnionAccess
-// CIR: %[[#BASE:]] = cir.get_member %0[0] {name = "b"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.bool>
+// CIR: cir.func {{.*}}shouldGenerateUnionAccess1U(%arg0: !u64i{{.*}})
+// CIR: %[[U:.*]] = cir.alloca "u" align(8) init : !cir.ptr<!rec_U>
+// CIR: %[[#BASE:]] = cir.get_member %[[U]][0] {name = "b"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.bool>
// CIR: cir.store{{.*}} %{{.+}}, %[[#BASE]] : !cir.bool, !cir.ptr<!cir.bool>
-// CIR: cir.get_member %0[0] {name = "b"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.bool>
-// CIR: %[[#BASE:]] = cir.get_member %0[2] {name = "i"} : !cir.ptr<!rec_U> -> !cir.ptr<!s32i>
+// CIR: cir.get_member %[[U]][0] {name = "b"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.bool>
+// CIR: %[[#BASE:]] = cir.get_member %[[U]][2] {name = "i"} : !cir.ptr<!rec_U> -> !cir.ptr<!s32i>
// CIR: cir.store{{.*}} %{{.+}}, %[[#BASE]] : !s32i, !cir.ptr<!s32i>
-// CIR: %[[#BASE:]] = cir.get_member %0[2] {name = "i"} : !cir.ptr<!rec_U> -> !cir.ptr<!s32i>
-// CIR: %[[#BASE:]] = cir.get_member %0[3] {name = "f"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.float>
+// CIR: %[[#BASE:]] = cir.get_member %[[U]][2] {name = "i"} : !cir.ptr<!rec_U> -> !cir.ptr<!s32i>
+// CIR: %[[#BASE:]] = cir.get_member %[[U]][3] {name = "f"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.float>
// CIR: cir.store{{.*}} %{{.+}}, %[[#BASE]] : !cir.float, !cir.ptr<!cir.float>
-// CIR: %[[#BASE:]] = cir.get_member %0[3] {name = "f"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.float>
-// CIR: %[[#BASE:]] = cir.get_member %0[4] {name = "d"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.double>
+// CIR: %[[#BASE:]] = cir.get_member %[[U]][3] {name = "f"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.float>
+// CIR: %[[#BASE:]] = cir.get_member %[[U]][4] {name = "d"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.double>
// CIR: cir.store{{.*}} %{{.+}}, %[[#BASE]] : !cir.double, !cir.ptr<!cir.double>
-// CIR: %[[#BASE:]] = cir.get_member %0[4] {name = "d"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.double>
+// CIR: %[[#BASE:]] = cir.get_member %[[U]][4] {name = "d"} : !cir.ptr<!rec_U> -> !cir.ptr<!cir.double>
-// LLVM: define {{.*}}shouldGenerateUnionAccess
+// LLVM: define {{.*}}shouldGenerateUnionAccess1U(i64 %{{[^,)]+}})
// LLVM: %[[BASE:.*]] = alloca %union.U
// LLVM: store %union.U %{{.*}}, ptr %[[BASE]]
// LLVM: store i8 1, ptr %[[BASE]]
diff --git a/clang/test/CIR/CodeGen/var-arg-aggregate.c b/clang/test/CIR/CodeGen/var-arg-aggregate.c
index c8b82f7bf3a54..c59d97108d7b4 100644
--- a/clang/test/CIR/CodeGen/var-arg-aggregate.c
+++ b/clang/test/CIR/CodeGen/var-arg-aggregate.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports padded, packed, and over-aligned record shapes.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/vector-binop-overflow.cpp b/clang/test/CIR/CodeGen/vector-binop-overflow.cpp
index 45771c98f9323..e213beab95a61 100644
--- a/clang/test/CIR/CodeGen/vector-binop-overflow.cpp
+++ b/clang/test/CIR/CodeGen/vector-binop-overflow.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/vector-convert-to-bool.c b/clang/test/CIR/CodeGen/vector-convert-to-bool.c
index 273aa3b380c41..88a2a13d1a430 100644
--- a/clang/test/CIR/CodeGen/vector-convert-to-bool.c
+++ b/clang/test/CIR/CodeGen/vector-convert-to-bool.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/vector-ext.cpp b/clang/test/CIR/CodeGen/vector-ext.cpp
index d01021fb230b5..92b455169ec17 100644
--- a/clang/test/CIR/CodeGen/vector-ext.cpp
+++ b/clang/test/CIR/CodeGen/vector-ext.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/vector.cpp b/clang/test/CIR/CodeGen/vector.cpp
index fad58f9ea3a5c..44f0ab10832b9 100644
--- a/clang/test/CIR/CodeGen/vector.cpp
+++ b/clang/test/CIR/CodeGen/vector.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/virtual-fn-calls-eh.cpp b/clang/test/CIR/CodeGen/virtual-fn-calls-eh.cpp
index 0f1e6d2d566be..423759a424d17 100644
--- a/clang/test/CIR/CodeGen/virtual-fn-calls-eh.cpp
+++ b/clang/test/CIR/CodeGen/virtual-fn-calls-eh.cpp
@@ -59,7 +59,7 @@ void call_virtual_fn_in_cleanup_scope() {
// LLVM: call void @_ZN1BC2Ev(ptr {{.*}} %[[B]])
// LLVM: br label %[[CLEANUP_SCOPE:.*]]
// LLVM: [[CLEANUP_SCOPE]]:
-// LLVM: invoke void @_ZN1B1fEc(ptr {{.*}} %[[B]], i8 noundef 99)
+// LLVM: invoke void @_ZN1B1fEc(ptr {{.*}} %[[B]], i8 noundef signext 99)
// LLVM: to label %[[NORMAL_CONTINUE:.*]] unwind label %[[UNWIND:.*]]
// LLVM: [[NORMAL_CONTINUE]]
// LLVM: br label %[[NORMAL_CLEANUP:.*]]
diff --git a/clang/test/CIR/CodeGen/virtual-function-calls.cpp b/clang/test/CIR/CodeGen/virtual-function-calls.cpp
index 896bc271b5fe3..ba5aa9bcaf432 100644
--- a/clang/test/CIR/CodeGen/virtual-function-calls.cpp
+++ b/clang/test/CIR/CodeGen/virtual-function-calls.cpp
@@ -107,7 +107,7 @@ void call_virtual_fn_in_cleanup_scope() {
// LLVM: call void @_ZN1BC2Ev(ptr {{.*}} %[[B]])
// LLVM: br label %[[CLEANUP_SCOPE:.*]]
// LLVM: [[CLEANUP_SCOPE]]:
-// LLVM: call void @_ZN1B1fEc(ptr {{.*}} %[[B]], i8 noundef 99)
+// LLVM: call void @_ZN1B1fEc(ptr {{.*}} %[[B]], i8 noundef signext 99)
// LLVM: br label %[[NORMAL_CLEANUP:.*]]
// LLVM: [[NORMAL_CLEANUP]]:
// LLVM: call void @_ZN1BD1Ev(ptr {{.*}} %[[B]])
diff --git a/clang/test/CIR/CodeGen/vtable-linkage-explicit-instantiation.cpp b/clang/test/CIR/CodeGen/vtable-linkage-explicit-instantiation.cpp
index cbb0fa4c571e7..104a686330f90 100644
--- a/clang/test/CIR/CodeGen/vtable-linkage-explicit-instantiation.cpp
+++ b/clang/test/CIR/CodeGen/vtable-linkage-explicit-instantiation.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports padded, packed, and over-aligned record shapes.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/vtable-nyi-nonconvertible-functype.cpp b/clang/test/CIR/CodeGen/vtable-nyi-nonconvertible-functype.cpp
index 08fdbe3964dd4..d1273d9ff2d5b 100644
--- a/clang/test/CIR/CodeGen/vtable-nyi-nonconvertible-functype.cpp
+++ b/clang/test/CIR/CodeGen/vtable-nyi-nonconvertible-functype.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports padded, packed, and over-aligned record shapes.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM,LLVMCIR --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=LLVM,OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/align-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/align-builtins.c
index e665a59c0bca1..a9fea4aa394f1 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/align-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/align-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -emit-cir -o %t.cir %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -emit-llvm -Wall -Werror %s -o - | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c
index a833970fff421..2632e361b7068 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c
@@ -1,21 +1,23 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c
index 1e12a95e0f408..167117b5ca590 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c
@@ -1,13 +1,15 @@
// REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -emit-cir -o %t.cir | opt -S -passes=mem2reg
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir | opt -S -passes=mem2reg
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -ffreestanding %s -triple=i386-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -emit-cir -o %t.cir | opt -S -passes=mem2reg
+// RUN: %clang_cc1 -ffreestanding %s -triple=i386-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir | opt -S -passes=mem2reg
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -emit-llvm -o %t.ll | opt -S -passes=mem2reg
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll | opt -S -passes=mem2reg
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -ffreestanding %s -triple=i386-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -emit-llvm -o %t.ll | opt -S -passes=mem2reg
+// RUN: %clang_cc1 -ffreestanding %s -triple=i386-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll | opt -S -passes=mem2reg
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -emit-llvm -o - | opt -S -passes=mem2reg | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx10_2_512bf16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx10_2_512bf16-builtins.c
index 7c230cbe0bb6a..988258dc63de9 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx10_2_512bf16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx10_2_512bf16-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx10_2bf16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx10_2bf16-builtins.c
index 76fda6b947304..6143839c517fb 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx10_2bf16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx10_2bf16-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c
index c6225d47671f2..fb2228b426dbf 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c
@@ -1,21 +1,23 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx2 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c
index 86720c7c4d73d..ed47eab572d89 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c
@@ -1,5 +1,7 @@
-// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
-// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
+// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
#include <immintrin.h>
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c
index 1dd800c77074c..d6974c678e0a7 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c
@@ -1,5 +1,7 @@
-// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
-// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
+// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
#include <immintrin.h>
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512-select-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512-select-builtins.c
index 7c37fb47e6501..806f64ef4e3d3 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512-select-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512-select-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -emit-cir -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c
index 743bab5e12bd9..bb76c67509fea 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c
@@ -1,13 +1,15 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -emit-llvm -o - -Wall -Werror -Wsign-conversion | FileCheck %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c
index ce264e871c820..c3fc4e6bb990b 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
index 819b0d3b2e17e..bb36f618255cf 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -emit-llvm -o - -Wall -Werror -Wsign-conversion | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512f16c-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512f16c-builtins.c
index 900a1b80a0f4d..bc59776dd51f2 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512f16c-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512f16c-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c
index 8e696154c57f7..18896751c6698 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types, the !cir.long_double wrapper, f16, and f128.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c
index de0b850825d8b..9ed5aa357fb49 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding -triple x86_64-unknown-linux-gnu -fclangir -target-feature +avx512vbmi2 -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -target-feature +avx512vbmi2 -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding -triple x86_64-unknown-linux-gnu -fclangir -target-feature +avx512vbmi2 -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -target-feature +avx512vbmi2 -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vbmi2 -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c
index 31757a6bd7d6f..6066e295753a0 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c
index 0d3751c499f6d..614c598ac99cc 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbw-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbw-builtins.c
index 08f11707f8d58..c6f2f195e7a54 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbw-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbw-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -target-feature +avx512vl -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -target-feature +avx512vl -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.1 -target-feature +avx512vl -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.1 -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.1 -target-feature +avx512vl -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.1 -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512bw -target-feature +avx512vl -emit-llvm -o - -Wall -Werror -Wsign-conversion | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vldq-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vldq-builtins.c
index 3274cfccf495d..c2cc5ed9005db 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vldq-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vldq-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -target-feature +avx512vl -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -target-feature +avx512vl -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512dq -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c
index 5ca315bc8317c..eb56470ecaee9 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the !cir.long_double wrapper and the f16 and f128 types.
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvbmi2-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvbmi2-builtins.c
index 9e0cdaa9eea75..8bcce00d03acf 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvbmi2-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvbmi2-builtins.c
@@ -1,12 +1,14 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
#include <immintrin.h>
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c
index c624099d2d8b8..a865e1a4c8c6c 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c
index 28ade5f481253..1a3364562d5ca 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/cmp-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/cmp-builtins.c
index e0b0ee1358ccf..b609e74b83527 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/cmp-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/cmp-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -emit-cir -o %t.cir %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -target-feature +avx512bw -emit-llvm -Wall -Werror %s -o - | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/keylocker.c b/clang/test/CIR/CodeGenBuiltins/X86/keylocker.c
index c925810e651f1..4090ea9c1f0b2 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/keylocker.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/keylocker.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -emit-cir -o %t.cir %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +kl -target-feature +widekl -emit-llvm -Wall -Werror %s -o - | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/permd-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/permd-builtins.c
index 93ae8d9c5304d..bb5e154804f4c 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/permd-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/permd-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -emit-cir -o %t.cir %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -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 -target-feature +avx512vl -emit-llvm -Wall -Werror %s -o - | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c
index d540e9c227e67..1da685a914c8d 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c
@@ -1,8 +1,10 @@
// Test X86-specific sqrt builtins
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512f -target-feature +avx512fp16 -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c
index b487ebfdf8fb6..c332bcb58c74c 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c
index 74d8e06ed3427..0936b0df41c63 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse2 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c
index b73f2eb0f9c38..45b40dd7782c8 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c
@@ -1,19 +1,21 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -emit-llvm -o - -Wall -Werror -Wsign-conversion | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/ssse3-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/ssse3-builtins.c
index 03d3462c4b203..f8362d593b87d 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/ssse3-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/ssse3-builtins.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +ssse3 -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +ssse3 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +ssse3 -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +ssse3 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/vec-set-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/vec-set-builtins.c
index c166128b8147d..b003259c3b18e 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/vec-set-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/vec-set-builtins.c
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -emit-cir -o %t.cir -Wall -Werror
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/xop-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/xop-builtins.c
index 5a5ba4c086f36..55a8949e50cef 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/xop-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/xop-builtins.c
@@ -1,21 +1,23 @@
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-cir -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-cir -clangir-disable-call-conv-lowering -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-cir -o %t.cir
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-cir -clangir-disable-call-conv-lowering -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fclangir -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -fclangir -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-cir -o %t.cir
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-cir -clangir-disable-call-conv-lowering -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-cir -o %t.cir
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-cir -clangir-disable-call-conv-lowering -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fclangir -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -fclangir -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
index 2d3900caeca3a..94199940e6ab0 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports _BitInt wider than 128 bits.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp
index 51c8db967e5d6..e77c2adca5807 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the !cir.long_double wrapper and the f16 and f128 types.
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c b/clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c
index 62388a3fb0ea9..b475469ac9ea9 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c
@@ -23,13 +23,14 @@ struct foo test0(int expr) {
return f;
}
-// CIR: cir.func {{.*}} @test0(%[[ARG0:.*]]: !s32i {{.*}}) -> !rec_foo
+// A two-int record fits in one eightbyte, so it is returned as i64.
+// CIR: cir.func {{.*}} @test0(%[[ARG0:.*]]: !s32i {{.*}}) -> !u64i
// CIR: %[[EXPR_ADDR:.*]] = cir.alloca "expr" {{.*}} init : !cir.ptr<!s32i>
// CIR: cir.store %[[ARG0]], %[[EXPR_ADDR]]
// CIR: %[[EXPR:.*]] = cir.load{{.*}} %[[EXPR_ADDR]]
// CIR: %[[IS_CONSTANT:.*]] = cir.is_constant %[[EXPR]] : !s32i -> !cir.bool
-// LLVM: define{{.*}} %struct.foo @test0(i32 {{.*}} %[[ARG0:.*]])
+// LLVM: define{{.*}} i64 @test0(i32 {{.*}} %[[ARG0:.*]])
// LLVM: %[[EXPR_ADDR:.*]] = alloca i32
// LLVM: store i32 %[[ARG0]], ptr %[[EXPR_ADDR]]
// LLVM: %[[EXPR:.*]] = load i32, ptr %[[EXPR_ADDR]]
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c b/clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c
index 25ce4c91bab4e..d38ca5daeed1a 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-float.c b/clang/test/CIR/CodeGenBuiltins/builtin-float.c
index f50bcbba7f8bf..3b68581c370fa 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-float.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-float.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the !cir.long_double wrapper and the f16 and f128 types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-isfpclass.c b/clang/test/CIR/CodeGenBuiltins/builtin-isfpclass.c
index 880e5e444aff8..b85d24c4bd34d 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-isfpclass.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-isfpclass.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the !cir.long_double wrapper and the f16 and f128 types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-reduce-bitwise.c b/clang/test/CIR/CodeGenBuiltins/builtin-reduce-bitwise.c
index 0036c62201ee0..092fa23e74bf3 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-reduce-bitwise.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-reduce-bitwise.c
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp
index 335383c075dac..fde7d3a5086f1 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -verify %s -o - > %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -verify %s -o - > %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -verify %s -o - > %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -verify %s -o - > %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
typedef int v4si __attribute__((vector_size(16)));
diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise-bool-nyi.c b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise-bool-nyi.c
index 933a1298ae5b9..ff0ae08f14fa5 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise-bool-nyi.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise-bool-nyi.c
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir %s -verify -emit-cir -o -
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports vector types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering %s -verify -emit-cir -o -
typedef _Bool vbool4 __attribute__((ext_vector_type(4)));
diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c b/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
index 47f01bebfe90c..ca697cea84592 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
@@ -1,8 +1,10 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the !cir.long_double wrapper and the f16 and f128 types.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple aarch64-apple-darwin-macho -fclangir -emit-cir %s -o %t-aarch64.cir
+// RUN: %clang_cc1 -triple aarch64-apple-darwin-macho -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t-aarch64.cir
// RUN: FileCheck --input-file=%t-aarch64.cir %s --check-prefix=AARCH64
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o %t-ogcg.ll %s
// RUN: FileCheck --input-file=%t-ogcg.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenCUDA/device-stub.cu b/clang/test/CIR/CodeGenCUDA/device-stub.cu
index ca5e185add5fc..67846c1fa572e 100644
--- a/clang/test/CIR/CodeGenCUDA/device-stub.cu
+++ b/clang/test/CIR/CodeGenCUDA/device-stub.cu
@@ -129,7 +129,7 @@ __device__ _BitInt(36) c;
// CIR-SAME: #cir.int<1> : !s32i,
// CIR-SAME: #cir.global_view<@__cuda_fatbin_str> : !cir.ptr<!void>,
// CIR-SAME: #cir.ptr<null> : !cir.ptr<!void>
-// CIR-SAME: }> : !rec_anon_struct {section = ".nvFatBinSegment"}
+// CIR-SAME: }> : !rec_anon_struct{{[0-9]*}} {section = ".nvFatBinSegment"}
// Check the GPU binary handle global.
// CIR: cir.global "private" internal @__cuda_gpubin_handle = #cir.ptr<null> : !cir.ptr<!cir.ptr<!void>>
@@ -255,7 +255,7 @@ __device__ _BitInt(36) c;
// HIP-CIR-SAME: #cir.int<1> : !s32i,
// HIP-CIR-SAME: #cir.global_view<@__hip_fatbin_str> : !cir.ptr<!void>,
// HIP-CIR-SAME: #cir.ptr<null> : !cir.ptr<!void>
-// HIP-CIR-SAME: }> : !rec_anon_struct {section = ".hipFatBinSegment"}
+// HIP-CIR-SAME: }> : !rec_anon_struct{{[0-9]*}} {section = ".hipFatBinSegment"}
// HIP-CIR: cir.global "private" internal @__hip_gpubin_handle = #cir.ptr<null> : !cir.ptr<!cir.ptr<!void>>
// HIP-CIR: cir.func private @__hipRegisterFatBinary(!cir.ptr<!void>) -> !cir.ptr<!cir.ptr<!void>>
diff --git a/clang/test/CIR/CodeGenCUDA/kernel-call.cu b/clang/test/CIR/CodeGenCUDA/kernel-call.cu
index 129976f780be7..5a0be6b536cb2 100644
--- a/clang/test/CIR/CodeGenCUDA/kernel-call.cu
+++ b/clang/test/CIR/CodeGenCUDA/kernel-call.cu
@@ -62,7 +62,8 @@
//
// Check cudaLaunchKernel is called with all 6 arguments:
// func ptr, gridDim, blockDim, args, sharedMem, stream
-// CUDA-NEW: cir.call @cudaLaunchKernel({{.*}}) : (!cir.ptr<!void>{{.*}}, !rec_dim3, !rec_dim3, !cir.ptr<!cir.ptr<!void>>{{.*}}, !u64i{{.*}}, !cir.ptr<!rec_cudaStream>{{.*}}) -> (!u32i {llvm.noundef})
+// dim3 is 12 bytes, so each one is passed as an INTEGER eightbyte pair.
+// CUDA-NEW: cir.call @cudaLaunchKernel({{.*}}) : (!cir.ptr<!void>{{.*}}, !u64i, !u32i, !u64i, !u32i, !cir.ptr<!cir.ptr<!void>>{{.*}}, !u64i{{.*}}, !cir.ptr<!rec_cudaStream>{{.*}}) -> (!u32i {llvm.noundef})
// CUDA-PTH: cir.call @cudaLaunchKernel_ptsz
//
@@ -71,7 +72,7 @@
// HIP-NEW: cir.alloca "stream" {{.*}} : !cir.ptr<!cir.ptr<!rec_hipStream>>
// HIP-NEW: cir.call @__hipPopCallConfiguration({{.*}}) : (!cir.ptr<!rec_dim3>, !cir.ptr<!rec_dim3>, !cir.ptr<!u64i>, !cir.ptr<!cir.ptr<!rec_hipStream>>) -> !s32i
// HIP-NEW: cir.get_global @_Z6kernelif : !cir.ptr<!cir.ptr<!cir.func<(!s32i, !cir.float)>>>
-// HIP-NEW: cir.call @hipLaunchKernel({{.*}}) : (!cir.ptr<!void> {{.*}}, !rec_dim3, !rec_dim3, !cir.ptr<!cir.ptr<!void>>{{.*}}, !u64i{{.*}}, !cir.ptr<!rec_hipStream>{{.*}}) -> (!u32i {llvm.noundef})
+// HIP-NEW: cir.call @hipLaunchKernel({{.*}}) : (!cir.ptr<!void> {{.*}}, !u64i, !u32i, !u64i, !u32i, !cir.ptr<!cir.ptr<!void>>{{.*}}, !u64i{{.*}}, !cir.ptr<!rec_hipStream>{{.*}}) -> (!u32i {llvm.noundef})
// HIP-PTH: cir.call @hipLaunchKernel_spt
__global__ void kernel(int x, float y) {}
@@ -106,8 +107,8 @@ int main(void) {
// HIP-NEW: cir.const #cir.ptr<null> : !cir.ptr<!rec_hipStream>
//
// Check Push call configuration is called with grid, block, shared mem, stream
- // CUDA-NEW: cir.call @__cudaPushCallConfiguration({{.*}}) : (!rec_dim3, !rec_dim3, !u64i {llvm.noundef}, !cir.ptr<!rec_cudaStream> {llvm.noundef}) -> !s32i
- // HIP-NEW: cir.call @__hipPushCallConfiguration({{.*}}) : (!rec_dim3, !rec_dim3, !u64i {llvm.noundef}, !cir.ptr<!rec_hipStream> {llvm.noundef}) -> !u32i
+ // CUDA-NEW: cir.call @__cudaPushCallConfiguration({{.*}}) : (!u64i, !u32i, !u64i, !u32i, !u64i {llvm.noundef}, !cir.ptr<!rec_cudaStream> {llvm.noundef}) -> !s32i
+ // HIP-NEW: cir.call @__hipPushCallConfiguration({{.*}}) : (!u64i, !u32i, !u64i, !u32i, !u64i {llvm.noundef}, !cir.ptr<!rec_hipStream> {llvm.noundef}) -> !u32i
//
// Check the config result is cast to bool for the conditional
// CUDA-NEW: cir.cast int_to_bool {{.*}} : !s32i -> !cir.bool
diff --git a/clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp b/clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp
index 32500f3002f2f..dd6a8c3ab3467 100644
--- a/clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp
+++ b/clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp
@@ -1,7 +1,9 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports padded, packed, and over-aligned record shapes.
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before.cir
// RUN: FileCheck %s --input-file=%t-before.cir --check-prefixes=CIR
// RUN: FileCheck %s --input-file=%t.cir --check-prefixes=CIR
-// RUN: %clang_cc1 %s -triple %itanium_abi_triple -Wno-unused-value -std=c++11 -fclangir -emit-llvm -o - -std=c++11 | FileCheck %s --check-prefixes=CIR-TO-LLVM
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -Wno-unused-value -std=c++11 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o - -std=c++11 | FileCheck %s --check-prefixes=CIR-TO-LLVM
// RUN: %clang_cc1 %s -triple %itanium_abi_triple -Wno-unused-value -std=c++11 -emit-llvm -o - -std=c++11 | FileCheck %s --check-prefixes=LLVM
// FIXME: missing `inbounds` in `getelementptr` in CIR-TO-LLVM output.
diff --git a/clang/test/CIR/CodeGenCXX/typeid.cpp b/clang/test/CIR/CodeGenCXX/typeid.cpp
index 47d4e57d31347..33e42aa94059e 100644
--- a/clang/test/CIR/CodeGenCXX/typeid.cpp
+++ b/clang/test/CIR/CodeGenCXX/typeid.cpp
@@ -1,7 +1,9 @@
-// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -fclangir -emit-cir -fcxx-exceptions -fexceptions -mmlir --mlir-print-ir-before=cir-cxxabi-lowering -o %t.cir 2> %t-before.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports the builtin i32 in the Itanium EH personality signature.
+// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -fclangir -clangir-disable-call-conv-lowering -emit-cir -fcxx-exceptions -fexceptions -mmlir --mlir-print-ir-before=cir-cxxabi-lowering -o %t.cir 2> %t-before.cir
// RUN: FileCheck %s --input-file=%t-before.cir --check-prefixes=CIR,CIR-BEFORE
// RUN: FileCheck %s --input-file=%t.cir --check-prefixes=CIR,CIR-AFTER
-// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -fclangir -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s --check-prefixes=LLVM
+// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s --check-prefixes=LLVM
// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s --check-prefixes=LLVM
#include <typeinfo>
diff --git a/clang/test/CIR/CodeGenCXX/uncopyable-args.cpp b/clang/test/CIR/CodeGenCXX/uncopyable-args.cpp
index 7a8835ee4af5c..94251ce8171be 100644
--- a/clang/test/CIR/CodeGenCXX/uncopyable-args.cpp
+++ b/clang/test/CIR/CodeGenCXX/uncopyable-args.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp b/clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp
index e10a47b7acea5..fc0508ec31f40 100644
--- a/clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp
+++ b/clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp
@@ -1,6 +1,9 @@
-// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class and padded, packed, and
+// over-aligned record shapes.
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenCoroutines/coro-exceptions.cpp b/clang/test/CIR/CodeGenCoroutines/coro-exceptions.cpp
index 5edae916f8f9f..e2c812471faec 100644
--- a/clang/test/CIR/CodeGenCoroutines/coro-exceptions.cpp
+++ b/clang/test/CIR/CodeGenCoroutines/coro-exceptions.cpp
@@ -1,4 +1,7 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class and a bare-variadic
+// declaration with no named parameter.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// FIXME: we currently don't have flatten-cfg for coroutines or lower to LLVM-IR
diff --git a/clang/test/CIR/CodeGenCoroutines/coro-task.cpp b/clang/test/CIR/CodeGenCoroutines/coro-task.cpp
index d0ba8c153bdbb..464a19ca9e6a2 100644
--- a/clang/test/CIR/CodeGenCoroutines/coro-task.cpp
+++ b/clang/test/CIR/CodeGenCoroutines/coro-task.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm -disable-llvm-passes %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenOpenACC/atomic-capture.cpp b/clang/test/CIR/CodeGenOpenACC/atomic-capture.cpp
index 1ca65b36b7bd8..425f5cc28bceb 100644
--- a/clang/test/CIR/CodeGenOpenACC/atomic-capture.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/atomic-capture.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -triple x86_64-linux-pc %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
struct HasOps {
operator float();
diff --git a/clang/test/CIR/CodeGenOpenACC/atomic-update.cpp b/clang/test/CIR/CodeGenOpenACC/atomic-update.cpp
index eaa2c309657d6..53e6d91c6b31a 100644
--- a/clang/test/CIR/CodeGenOpenACC/atomic-update.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/atomic-update.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -triple x86_64-linux-pc %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
struct HasOps {
operator float();
diff --git a/clang/test/CIR/CodeGenOpenACC/atomic-write.cpp b/clang/test/CIR/CodeGenOpenACC/atomic-write.cpp
index af77b23d9f8f6..7ad798dca0e9d 100644
--- a/clang/test/CIR/CodeGenOpenACC/atomic-write.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/atomic-write.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -triple x86_64-linux-pc %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
extern "C" bool condition(int x, unsigned int y, float f);
extern "C" double do_thing(float f);
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-copy.cpp b/clang/test/CIR/CodeGenOpenACC/declare-copy.cpp
index 2683a56f29720..1d5b075e29ac9 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-copy.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-copy.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp b/clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp
index 2d044ca86d975..dd1ecd0286d60 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp b/clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp
index a9a090218cd32..53f65daa828ab 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-create.cpp b/clang/test/CIR/CodeGenOpenACC/declare-create.cpp
index d44db9289733a..4c55957f30159 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-create.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-create.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-deviceresident.cpp b/clang/test/CIR/CodeGenOpenACC/declare-deviceresident.cpp
index 29f7ea66d7ac0..3919a7ed49382 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-deviceresident.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-deviceresident.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-present.cpp b/clang/test/CIR/CodeGenOpenACC/declare-present.cpp
index b7d85db4b246a..88368a4452f0f 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-present.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-present.cpp
@@ -1,5 +1,7 @@
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o %t.cir
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o %t.cir
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/routine-bind.cpp b/clang/test/CIR/CodeGenOpenACC/routine-bind.cpp
index 4978ddd31198c..baa7cb5057726 100644
--- a/clang/test/CIR/CodeGenOpenACC/routine-bind.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/routine-bind.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir %s -o - | FileCheck %s
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
// FIXME: We should run this against Windows mangling as well at one point.
#pragma acc routine seq bind("BIND1")
diff --git a/clang/test/CIR/CodeGenSYCL/kernel-call-stmt.cpp b/clang/test/CIR/CodeGenSYCL/kernel-call-stmt.cpp
index 3f42bad95dc14..894b4e734f2ce 100644
--- a/clang/test/CIR/CodeGenSYCL/kernel-call-stmt.cpp
+++ b/clang/test/CIR/CodeGenSYCL/kernel-call-stmt.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// supports parameters of an empty or tag class.
+// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/func-simple.cpp b/clang/test/CIR/func-simple.cpp
index 801f8cb4e7f01..68fd094332120 100644
--- a/clang/test/CIR/func-simple.cpp
+++ b/clang/test/CIR/func-simple.cpp
@@ -68,7 +68,7 @@ unsigned long long ullfunc() { return 42ull; }
// CHECK: }
bool boolfunc() { return true; }
-// CHECK: cir.func{{.*}} @_Z8boolfuncv() -> (!cir.bool {llvm.noundef})
+// CHECK: cir.func{{.*}} @_Z8boolfuncv() -> (!cir.bool {llvm.noundef, llvm.zeroext})
// CHECK: %0 = cir.alloca "__retval" align(1) : !cir.ptr<!cir.bool>
// CHECK: %1 = cir.const #true
// CHECK: cir.store %1, %0 : !cir.bool, !cir.ptr<!cir.bool>
>From 3cc608ed7458c5a58e76401c70612ca3d47dc754 Mon Sep 17 00:00:00 2001
From: Adam Smith <adams at nvidia.com>
Date: Mon, 10 Aug 2026 11:36:08 -0700
Subject: [PATCH 2/5] [CIR] Spell the callconv flag as a BoolFOption pair
`BoolOption` expands to the same `MarshallingInfoBooleanFlag` pair that was
hand-written here, so the hand-rolled records and the comment justifying
them are unnecessary. Renames the flag to `-fclangir-call-conv-lowering`
and `-fno-clangir-call-conv-lowering`, dropping `enable` from the spelling,
matching `defm clangir : BoolFOption<"clangir", ...>` a few lines below.
Assisted-by: Cursor / claude-opus-5
---
clang/docs/CIR/ABILowering.rst | 4 ++--
clang/include/clang/Options/Options.td | 22 ++++++-------------
clang/test/CIR/CodeGen/array-ctor.cpp | 8 +++----
clang/test/CIR/CodeGen/attr-noundef.cpp | 6 ++---
clang/test/CIR/CodeGen/bitfields.cpp | 6 ++---
.../CIR/CodeGen/bitint-split-storage-nyi.c | 10 ++++-----
clang/test/CIR/CodeGen/bitint.c | 6 ++---
clang/test/CIR/CodeGen/builtins-x86.c | 6 ++---
.../CIR/CodeGen/call-conv-lowering-flag.c | 10 ++++-----
.../CodeGen/call-conv-lowering-x86_64-fnptr.c | 4 ++--
.../call-conv-lowering-x86_64-indirect.c | 4 ++--
.../call-conv-lowering-x86_64-variadic.c | 4 ++--
.../CIR/CodeGen/call-conv-lowering-x86_64.c | 4 ++--
clang/test/CIR/CodeGen/catch-in-loop.cpp | 6 ++---
.../cleanup-conditional-with-wrapper-eh.cpp | 6 ++---
.../cleanup-conditional-with-wrapper.cpp | 6 ++---
.../test/CIR/CodeGen/cleanup-conditional.cpp | 6 ++---
.../CodeGen/cleanup-derived-to-base-ref.cpp | 6 ++---
.../CodeGen/cleanup-scope-throw-caught.cpp | 6 ++---
clang/test/CIR/CodeGen/cleanup.cpp | 4 ++--
clang/test/CIR/CodeGen/complex-cast.cpp | 8 +++----
clang/test/CIR/CodeGen/complex.cpp | 6 ++---
clang/test/CIR/CodeGen/ctor-try-body.cpp | 6 ++---
.../CodeGen/cxx-rewritten-binary-operator.cpp | 6 ++---
.../CodeGen/cxx23-explicit-object-member.cpp | 6 ++---
.../CodeGen/cxx2b-static-call-operator.cpp | 6 ++---
.../CIR/CodeGen/default-func-attrs-invoke.cpp | 6 ++---
clang/test/CIR/CodeGen/delete-destroying.cpp | 6 ++---
clang/test/CIR/CodeGen/dtors.cpp | 6 ++---
clang/test/CIR/CodeGen/forrange.cpp | 4 ++--
.../CodeGen/global-init-coerced-return.cpp | 4 ++--
clang/test/CIR/CodeGen/invoke-attrs.cpp | 6 ++---
.../test/CIR/CodeGen/long-double-inc-dec.cpp | 14 ++++++------
clang/test/CIR/CodeGen/loop-cond-cleanup.cpp | 6 ++---
.../CIR/CodeGen/loop-cond-var-cleanup.cpp | 6 ++---
clang/test/CIR/CodeGen/mem-expr-fn.cpp | 6 ++---
clang/test/CIR/CodeGen/new-null.cpp | 6 ++---
clang/test/CIR/CodeGen/nofpclass.c | 6 ++---
.../CIR/CodeGen/non-odr-use-const-bool.cpp | 6 ++---
clang/test/CIR/CodeGen/nrvo.cpp | 8 +++----
clang/test/CIR/CodeGen/pack-indexing.cpp | 6 ++---
.../test/CIR/CodeGen/paren-list-agg-init.cpp | 6 ++---
.../CIR/CodeGen/partial-array-cleanup.cpp | 6 ++---
.../test/CIR/CodeGen/record-type-metadata.cpp | 4 ++--
clang/test/CIR/CodeGen/three-way-cmp.cpp | 8 +++----
clang/test/CIR/CodeGen/trivial-abi.cpp | 6 ++---
.../CodeGen/try-catch-all-with-cleanup.cpp | 6 ++---
.../CodeGen/try-catch-non-trivial-copy.cpp | 6 ++---
clang/test/CIR/CodeGen/try-catch.cpp | 6 ++---
.../CIR/CodeGen/try-no-throwing-calls.cpp | 6 ++---
clang/test/CIR/CodeGen/unary.cpp | 6 ++---
clang/test/CIR/CodeGen/union.c | 6 ++---
clang/test/CIR/CodeGen/var-arg-aggregate.c | 6 ++---
.../CIR/CodeGen/vector-binop-overflow.cpp | 6 ++---
.../test/CIR/CodeGen/vector-convert-to-bool.c | 6 ++---
clang/test/CIR/CodeGen/vector-ext.cpp | 6 ++---
clang/test/CIR/CodeGen/vector.cpp | 6 ++---
.../vtable-linkage-explicit-instantiation.cpp | 6 ++---
.../vtable-nyi-nonconvertible-functype.cpp | 6 ++---
.../CIR/CodeGenBuiltins/X86/align-builtins.c | 10 ++++-----
.../CIR/CodeGenBuiltins/X86/avx-builtins.c | 18 +++++++--------
.../X86/avx-shuffle-builtins.c | 10 ++++-----
.../X86/avx10_2_512bf16-builtins.c | 6 ++---
.../X86/avx10_2bf16-builtins.c | 6 ++---
.../CIR/CodeGenBuiltins/X86/avx2-builtins.c | 18 +++++++--------
.../CodeGenBuiltins/X86/avx512-reduceIntrin.c | 6 ++---
.../X86/avx512-reduceMinMaxIntrin.c | 6 ++---
.../X86/avx512-select-builtins.c | 6 ++---
.../CodeGenBuiltins/X86/avx512bw-builtins.c | 10 ++++-----
.../CodeGenBuiltins/X86/avx512dq-builtins.c | 10 ++++-----
.../CodeGenBuiltins/X86/avx512f-builtins.c | 10 ++++-----
.../CodeGenBuiltins/X86/avx512f16c-builtins.c | 6 ++---
.../CodeGenBuiltins/X86/avx512fp16-builtins.c | 6 ++---
.../X86/avx512vbmi2-builtins.c | 6 ++---
.../CodeGenBuiltins/X86/avx512vl-builtins.c | 6 ++---
.../X86/avx512vlbf16-builtins.c | 6 ++---
.../CodeGenBuiltins/X86/avx512vlbw-builtins.c | 10 ++++-----
.../CodeGenBuiltins/X86/avx512vldq-builtins.c | 6 ++---
.../X86/avx512vlfp16-builtins.c | 6 ++---
.../X86/avx512vlvbmi2-builtins.c | 10 ++++-----
.../X86/avx512vlvp2intersect-builtins.c | 10 ++++-----
.../X86/avx512vp2intersect-builtins.c | 10 ++++-----
.../CIR/CodeGenBuiltins/X86/cmp-builtins.c | 10 ++++-----
.../test/CIR/CodeGenBuiltins/X86/keylocker.c | 10 ++++-----
.../CIR/CodeGenBuiltins/X86/permd-builtins.c | 10 ++++-----
.../CIR/CodeGenBuiltins/X86/sqrt-builtins.c | 6 ++---
.../CIR/CodeGenBuiltins/X86/sse-builtins.c | 10 ++++-----
.../CIR/CodeGenBuiltins/X86/sse2-builtins.c | 10 ++++-----
.../CIR/CodeGenBuiltins/X86/sse41-builtins.c | 18 +++++++--------
.../CIR/CodeGenBuiltins/X86/ssse3-builtins.c | 6 ++---
.../CodeGenBuiltins/X86/vec-set-builtins.c | 10 ++++-----
.../CIR/CodeGenBuiltins/X86/xop-builtins.c | 18 +++++++--------
.../test/CIR/CodeGenBuiltins/builtin-bit.cpp | 6 ++---
.../test/CIR/CodeGenBuiltins/builtin-call.cpp | 6 ++---
.../CIR/CodeGenBuiltins/builtin-fcmp-sse.c | 6 ++---
.../test/CIR/CodeGenBuiltins/builtin-float.c | 6 ++---
.../CIR/CodeGenBuiltins/builtin-isfpclass.c | 6 ++---
.../CodeGenBuiltins/builtin-reduce-bitwise.c | 6 ++---
.../CodeGenBuiltins/builtin-undef-rvalue.cpp | 6 ++---
.../builtins-elementwise-bool-nyi.c | 4 ++--
.../CodeGenBuiltins/builtins-floating-point.c | 8 +++----
.../CIR/CodeGenCXX/typeid-most-derived.cpp | 6 ++---
clang/test/CIR/CodeGenCXX/typeid.cpp | 6 ++---
clang/test/CIR/CodeGenCXX/uncopyable-args.cpp | 6 ++---
.../test/CIR/CodeGenCXX/x86_64-arguments.cpp | 6 ++---
.../CIR/CodeGenCoroutines/coro-exceptions.cpp | 4 ++--
.../test/CIR/CodeGenCoroutines/coro-task.cpp | 4 ++--
.../CIR/CodeGenOpenACC/atomic-capture.cpp | 4 ++--
.../test/CIR/CodeGenOpenACC/atomic-update.cpp | 4 ++--
.../test/CIR/CodeGenOpenACC/atomic-write.cpp | 4 ++--
.../test/CIR/CodeGenOpenACC/declare-copy.cpp | 4 ++--
.../CIR/CodeGenOpenACC/declare-copyin.cpp | 4 ++--
.../CIR/CodeGenOpenACC/declare-copyout.cpp | 4 ++--
.../CIR/CodeGenOpenACC/declare-create.cpp | 4 ++--
.../CodeGenOpenACC/declare-deviceresident.cpp | 4 ++--
.../CIR/CodeGenOpenACC/declare-present.cpp | 6 ++---
.../private-clause-coerced-ctor.cpp | 2 +-
.../test/CIR/CodeGenOpenACC/routine-bind.cpp | 4 ++--
.../test/CIR/CodeGenSYCL/kernel-call-stmt.cpp | 6 ++---
119 files changed, 405 insertions(+), 413 deletions(-)
diff --git a/clang/docs/CIR/ABILowering.rst b/clang/docs/CIR/ABILowering.rst
index 287fdd69c80ee..3b5256a2c810c 100644
--- a/clang/docs/CIR/ABILowering.rst
+++ b/clang/docs/CIR/ABILowering.rst
@@ -576,8 +576,8 @@ enabled on an x86_64 target. On every other triple the pipeline omits the
pass, because x86_64 System V is the only classifier implemented so far, and
signatures reach the LLVM dialect in their high-level form.
-``-clangir-disable-call-conv-lowering`` turns the pass off and
-``-clangir-enable-call-conv-lowering`` turns it back on. The last one on the
+``-fno-clangir-call-conv-lowering`` turns the pass off and
+``-fclangir-call-conv-lowering`` turns it back on. The last one on the
command line wins, so a build can disable the pass globally and re-enable it
for a single translation unit. Both are ``-cc1`` options, so reach them from
the driver through ``-Xclang``.
diff --git a/clang/include/clang/Options/Options.td b/clang/include/clang/Options/Options.td
index 4c5aaa6fa052a..9aed8f8ceafb4 100644
--- a/clang/include/clang/Options/Options.td
+++ b/clang/include/clang/Options/Options.td
@@ -3467,21 +3467,13 @@ def clangir_enable_idiom_recognizer : Flag<["-"], "clangir-enable-idiom-recogniz
HelpText<"ClangIR: Enable Idiom Recognizer pass">,
MarshallingInfoFlag<FrontendOpts<"ClangIREnableIdiomRecognizer">>;
-// The enable/disable pair below is spelled out rather than generated by
-// BoolOption, which can only generate an X / no-X pair.
-def clangir_enable_call_conv_lowering : Flag<["-"], "clangir-enable-call-conv-lowering">,
- Visibility<[ClangOption, CC1Option]>,
- HelpText<"ClangIR: Enable calling-convention lowering pass (x86_64 only, on "
- "by default)">,
- MarshallingInfoBooleanFlag<FrontendOpts<"ClangIRCallConvLowering">, "true",
- "true", "false",
- "clangir_disable_call_conv_lowering">;
-def clangir_disable_call_conv_lowering : Flag<["-"], "clangir-disable-call-conv-lowering">,
- Visibility<[ClangOption, CC1Option]>,
- HelpText<"ClangIR: Disable calling-convention lowering pass (x86_64 only)">,
- MarshallingInfoBooleanFlag<FrontendOpts<"ClangIRCallConvLowering">, "true",
- "false", "true",
- "clangir_enable_call_conv_lowering">;
+defm clangir_call_conv_lowering : BoolFOption<"clangir-call-conv-lowering",
+ FrontendOpts<"ClangIRCallConvLowering">, DefaultTrue,
+ PosFlag<SetTrue, [], [ClangOption, CC1Option],
+ "Run the ClangIR calling-convention lowering pass">,
+ NegFlag<SetFalse, [], [ClangOption, CC1Option],
+ "Do not run the ClangIR calling-convention lowering pass">,
+ BothFlags<[], [ClangOption, CC1Option], " (x86_64 only)">>;
def clangir_lib_opt_EQ : Joined<["-"], "clangir-lib-opt=">,
Visibility<[ClangOption, CC1Option]>, Group<f_Group>, Values<"all">,
diff --git a/clang/test/CIR/CodeGen/array-ctor.cpp b/clang/test/CIR/CodeGen/array-ctor.cpp
index b661f78157c76..c5ff5f2b82404 100644
--- a/clang/test/CIR/CodeGen/array-ctor.cpp
+++ b/clang/test/CIR/CodeGen/array-ctor.cpp
@@ -1,9 +1,9 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o - 2>&1 | FileCheck --check-prefixes=CIR-BEFORE-LPP %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o - 2>&1 | FileCheck --check-prefixes=CIR-BEFORE-LPP %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/attr-noundef.cpp b/clang/test/CIR/CodeGen/attr-noundef.cpp
index 9052c9dea11a0..c52daa172ebb8 100644
--- a/clang/test/CIR/CodeGen/attr-noundef.cpp
+++ b/clang/test/CIR/CodeGen/attr-noundef.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-gnu-linux -x c++ -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/bitfields.cpp b/clang/test/CIR/CodeGen/bitfields.cpp
index 53b1ed85a662a..d964db1cbc188 100644
--- a/clang/test/CIR/CodeGen/bitfields.cpp
+++ b/clang/test/CIR/CodeGen/bitfields.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports padded, packed, and over-aligned record shapes.
-// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/bitint-split-storage-nyi.c b/clang/test/CIR/CodeGen/bitint-split-storage-nyi.c
index 786617ff02975..f536901476c62 100644
--- a/clang/test/CIR/CodeGen/bitint-split-storage-nyi.c
+++ b/clang/test/CIR/CodeGen/bitint-split-storage-nyi.c
@@ -1,9 +1,9 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _BitInt wider than 128 bits.
-// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -DGLOBAL %s -o - 2>&1 | FileCheck %s --check-prefix=GLOBAL
-// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -DALLOCA %s -o - 2>&1 | FileCheck %s --check-prefix=ALLOCA
-// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -DSTORE %s -o - 2>&1 | FileCheck %s --check-prefix=STORE
-// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -DLOAD %s -o - 2>&1 | FileCheck %s --check-prefix=LOAD
+// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm -DGLOBAL %s -o - 2>&1 | FileCheck %s --check-prefix=GLOBAL
+// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm -DALLOCA %s -o - 2>&1 | FileCheck %s --check-prefix=ALLOCA
+// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm -DSTORE %s -o - 2>&1 | FileCheck %s --check-prefix=STORE
+// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm -DLOAD %s -o - 2>&1 | FileCheck %s --check-prefix=LOAD
#ifdef GLOBAL
signed _BitInt(129) g129 = 1;
diff --git a/clang/test/CIR/CodeGen/bitint.c b/clang/test/CIR/CodeGen/bitint.c
index 0a1fa721c0778..c6b4d607b8bc8 100644
--- a/clang/test/CIR/CodeGen/bitint.c
+++ b/clang/test/CIR/CodeGen/bitint.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _BitInt wider than 128 bits.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/builtins-x86.c b/clang/test/CIR/CodeGen/builtins-x86.c
index d97e41e972e66..fa4730b4fc381 100644
--- a/clang/test/CIR/CodeGen/builtins-x86.c
+++ b/clang/test/CIR/CodeGen/builtins-x86.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512fp16 -target-feature +avx512bf16 -target-feature +avx512vl -target-feature +sse4a -emit-llvm %s -o %t-ogcg.ll
// RUN: FileCheck --input-file=%t-ogcg.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/call-conv-lowering-flag.c b/clang/test/CIR/CodeGen/call-conv-lowering-flag.c
index fd7e29deb7c08..c29df7b7ee282 100644
--- a/clang/test/CIR/CodeGen/call-conv-lowering-flag.c
+++ b/clang/test/CIR/CodeGen/call-conv-lowering-flag.c
@@ -1,15 +1,15 @@
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - \
// RUN: | FileCheck %s --check-prefix=ON
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - \
-// RUN: -clangir-disable-call-conv-lowering \
+// RUN: -fno-clangir-call-conv-lowering \
// RUN: | FileCheck %s --check-prefix=OFF
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - \
-// RUN: -clangir-enable-call-conv-lowering -clangir-disable-call-conv-lowering \
-// RUN: -clangir-enable-call-conv-lowering \
+// RUN: -fclangir-call-conv-lowering -fno-clangir-call-conv-lowering \
+// RUN: -fclangir-call-conv-lowering \
// RUN: | FileCheck %s --check-prefix=ON
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o - \
-// RUN: -clangir-disable-call-conv-lowering -clangir-enable-call-conv-lowering \
-// RUN: -clangir-disable-call-conv-lowering \
+// RUN: -fno-clangir-call-conv-lowering -fclangir-call-conv-lowering \
+// RUN: -fno-clangir-call-conv-lowering \
// RUN: | FileCheck %s --check-prefix=OFF
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - \
// RUN: | FileCheck %s --check-prefix=ON
diff --git a/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-fnptr.c b/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-fnptr.c
index 39cca0a1e2589..b2b427c8376e3 100644
--- a/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-fnptr.c
+++ b/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-fnptr.c
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
// RUN: FileCheck --check-prefix=CIRGLOBAL --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefixes=LLVM,LLVM-CIR --input-file=%t-cir.ll %s
// RUN: FileCheck --check-prefix=DECL --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
diff --git a/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-indirect.c b/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-indirect.c
index b6c22f0f0077d..d9225423a7bea 100644
--- a/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-indirect.c
+++ b/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-indirect.c
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefixes=LLVM,LLVM-CIR --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefixes=LLVM,LLVM-OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-variadic.c b/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-variadic.c
index 69edb45129abd..2821c271e9233 100644
--- a/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-variadic.c
+++ b/clang/test/CIR/CodeGen/call-conv-lowering-x86_64-variadic.c
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefixes=LLVM,LLVM-CIR --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefixes=LLVM,LLVM-OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/call-conv-lowering-x86_64.c b/clang/test/CIR/CodeGen/call-conv-lowering-x86_64.c
index 8382b15bb5d9e..1f823b4680364 100644
--- a/clang/test/CIR/CodeGen/call-conv-lowering-x86_64.c
+++ b/clang/test/CIR/CodeGen/call-conv-lowering-x86_64.c
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefixes=LLVM,LLVM-CIR --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefixes=LLVM,LLVM-OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/catch-in-loop.cpp b/clang/test/CIR/CodeGen/catch-in-loop.cpp
index e224470c43350..89ad5fde2eae4 100644
--- a/clang/test/CIR/CodeGen/catch-in-loop.cpp
+++ b/clang/test/CIR/CodeGen/catch-in-loop.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir --check-prefix=CIR %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll --check-prefix=LLVM %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++14 -fcxx-exceptions -fexceptions -emit-llvm %s -o %t-ogcg.ll
// RUN: FileCheck --input-file=%t-ogcg.ll --check-prefix=OGCG %s
diff --git a/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp b/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp
index af2188f44a01b..443d15f30fbd6 100644
--- a/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper-eh.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp b/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp
index 8e0f8a7a181c3..09d1d59631d69 100644
--- a/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-conditional-with-wrapper.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/cleanup-conditional.cpp b/clang/test/CIR/CodeGen/cleanup-conditional.cpp
index 5f83e782c2971..4a75dbed1925d 100644
--- a/clang/test/CIR/CodeGen/cleanup-conditional.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-conditional.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _Complex types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/cleanup-derived-to-base-ref.cpp b/clang/test/CIR/CodeGen/cleanup-derived-to-base-ref.cpp
index 8524c1d995187..b8d54b5cb3321 100644
--- a/clang/test/CIR/CodeGen/cleanup-derived-to-base-ref.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-derived-to-base-ref.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -fcxx-exceptions -fexceptions -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -fcxx-exceptions -fexceptions -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -fcxx-exceptions -fexceptions -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -fcxx-exceptions -fexceptions -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
struct Base {};
diff --git a/clang/test/CIR/CodeGen/cleanup-scope-throw-caught.cpp b/clang/test/CIR/CodeGen/cleanup-scope-throw-caught.cpp
index b8adde241e5cc..88a9dcd965ad9 100644
--- a/clang/test/CIR/CodeGen/cleanup-scope-throw-caught.cpp
+++ b/clang/test/CIR/CodeGen/cleanup-scope-throw-caught.cpp
@@ -1,10 +1,10 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: cir-opt -cir-hoist-allocas -cir-flatten-cfg -cir-eh-abi-lowering %t.cir -o %t.eh.cir
// RUN: FileCheck --input-file=%t.eh.cir %s -check-prefix=CIR-EHABI
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/cleanup.cpp b/clang/test/CIR/CodeGen/cleanup.cpp
index 8135bd9f36e09..e8f5cba57475b 100644
--- a/clang/test/CIR/CodeGen/cleanup.cpp
+++ b/clang/test/CIR/CodeGen/cleanup.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _Complex types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s
struct Struk {
diff --git a/clang/test/CIR/CodeGen/complex-cast.cpp b/clang/test/CIR/CodeGen/complex-cast.cpp
index 5dc65ffd72037..fa840e161f1fc 100644
--- a/clang/test/CIR/CodeGen/complex-cast.cpp
+++ b/clang/test/CIR/CodeGen/complex-cast.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _Complex types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-canonicalize -o %t.cir %s 2>&1 | FileCheck --check-prefix=CIR-BEFORE %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-after=cir-lowering-prepare -o %t.cir %s 2>&1 | FileCheck --check-prefixes=CIR-AFTER %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-canonicalize -o %t.cir %s 2>&1 | FileCheck --check-prefix=CIR-BEFORE %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-after=cir-lowering-prepare -o %t.cir %s 2>&1 | FileCheck --check-prefixes=CIR-AFTER %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/complex.cpp b/clang/test/CIR/CodeGen/complex.cpp
index 593434d8a0440..0b8229d58d681 100644
--- a/clang/test/CIR/CodeGen/complex.cpp
+++ b/clang/test/CIR/CodeGen/complex.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _Complex types.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/ctor-try-body.cpp b/clang/test/CIR/CodeGen/ctor-try-body.cpp
index 7162bbdae2a7c..9e530c54c58d1 100644
--- a/clang/test/CIR/CodeGen/ctor-try-body.cpp
+++ b/clang/test/CIR/CodeGen/ctor-try-body.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM,LLVMCIR
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM,OGCG
diff --git a/clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp b/clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp
index f4aee0452914f..74066f456ed24 100644
--- a/clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp
+++ b/clang/test/CIR/CodeGen/cxx-rewritten-binary-operator.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _Complex types and parameters of an empty or tag class.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/cxx23-explicit-object-member.cpp b/clang/test/CIR/CodeGen/cxx23-explicit-object-member.cpp
index 8a48c0b3da08e..a62337d857b7b 100644
--- a/clang/test/CIR/CodeGen/cxx23-explicit-object-member.cpp
+++ b/clang/test/CIR/CodeGen/cxx23-explicit-object-member.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/cxx2b-static-call-operator.cpp b/clang/test/CIR/CodeGen/cxx2b-static-call-operator.cpp
index 11507c38883de..9732ca1510c5d 100644
--- a/clang/test/CIR/CodeGen/cxx2b-static-call-operator.cpp
+++ b/clang/test/CIR/CodeGen/cxx2b-static-call-operator.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/default-func-attrs-invoke.cpp b/clang/test/CIR/CodeGen/default-func-attrs-invoke.cpp
index 5e92fafbd23cd..548ee0070eb66 100644
--- a/clang/test/CIR/CodeGen/default-func-attrs-invoke.cpp
+++ b/clang/test/CIR/CodeGen/default-func-attrs-invoke.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -default-function-attr "key=value" -default-function-attr "just_key" -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/delete-destroying.cpp b/clang/test/CIR/CodeGen/delete-destroying.cpp
index f59a558d6fd00..95fa159fc5f82 100644
--- a/clang/test/CIR/CodeGen/delete-destroying.cpp
+++ b/clang/test/CIR/CodeGen/delete-destroying.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -mconstructor-aliases -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -fno-clangir-call-conv-lowering -mconstructor-aliases -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -mconstructor-aliases -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -fno-clangir-call-conv-lowering -mconstructor-aliases -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/dtors.cpp b/clang/test/CIR/CodeGen/dtors.cpp
index 83ace808b8a98..1ec816b9288d0 100644
--- a/clang/test/CIR/CodeGen/dtors.cpp
+++ b/clang/test/CIR/CodeGen/dtors.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -mconstructor-aliases -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/forrange.cpp b/clang/test/CIR/CodeGen/forrange.cpp
index 1b188e2c7dafc..339b18e6ab2da 100644
--- a/clang/test/CIR/CodeGen/forrange.cpp
+++ b/clang/test/CIR/CodeGen/forrange.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
struct Element {};
diff --git a/clang/test/CIR/CodeGen/global-init-coerced-return.cpp b/clang/test/CIR/CodeGen/global-init-coerced-return.cpp
index a7b4b3abfb6a2..c991eb2362f20 100644
--- a/clang/test/CIR/CodeGen/global-init-coerced-return.cpp
+++ b/clang/test/CIR/CodeGen/global-init-coerced-return.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-enable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/invoke-attrs.cpp b/clang/test/CIR/CodeGen/invoke-attrs.cpp
index 630a9a2d54462..9e537ad10f3da 100644
--- a/clang/test/CIR/CodeGen/invoke-attrs.cpp
+++ b/clang/test/CIR/CodeGen/invoke-attrs.cpp
@@ -1,10 +1,10 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: cir-opt --cir-flatten-cfg %t.cir -o %t-flat.cir
// RUN: FileCheck --input-file=%t-flat.cir %s --check-prefix=CIR-FLAT
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/long-double-inc-dec.cpp b/clang/test/CIR/CodeGen/long-double-inc-dec.cpp
index 30f0ad2582d11..a15681cb6aad3 100644
--- a/clang/test/CIR/CodeGen/long-double-inc-dec.cpp
+++ b/clang/test/CIR/CodeGen/long-double-inc-dec.cpp
@@ -1,22 +1,22 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the !cir.long_double wrapper and the f16 and f128 types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR -DLDTY=cir.double
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM,LLVMCIR -DLDTY=double
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-64 -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,OGCG -DLDTY=double
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR -DLDTY=cir.f80
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM,LLVMCIR -DLDTY=x86_fp80
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-80 -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,OGCG -DLDTY=x86_fp80
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR -DLDTY=cir.f128
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM,LLVMCIR -DLDTY=fp128
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mlong-double-128 -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,OGCG -DLDTY=fp128
diff --git a/clang/test/CIR/CodeGen/loop-cond-cleanup.cpp b/clang/test/CIR/CodeGen/loop-cond-cleanup.cpp
index 7d9696d281d13..5f26cb427212a 100644
--- a/clang/test/CIR/CodeGen/loop-cond-cleanup.cpp
+++ b/clang/test/CIR/CodeGen/loop-cond-cleanup.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -std=c++17 -fcxx-exceptions -fexceptions -o %t.cir
+// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir -std=c++17 -fcxx-exceptions -fexceptions -o %t.cir
// RUN: FileCheck -check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t-cir.ll
+// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t-cir.ll
// RUN: FileCheck -check-prefixes=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t.ll
// RUN: FileCheck -check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/loop-cond-var-cleanup.cpp b/clang/test/CIR/CodeGen/loop-cond-var-cleanup.cpp
index 7a4588b20b716..aba03f0532df5 100644
--- a/clang/test/CIR/CodeGen/loop-cond-var-cleanup.cpp
+++ b/clang/test/CIR/CodeGen/loop-cond-var-cleanup.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -std=c++17 -fcxx-exceptions -fexceptions -o %t.cir
+// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir -std=c++17 -fcxx-exceptions -fexceptions -o %t.cir
// RUN: FileCheck -check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t-cir.ll
+// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t-cir.ll
// RUN: FileCheck -check-prefixes=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -no-enable-noundef-analysis %s -triple=x86_64-linux-gnu -emit-llvm -std=c++17 -fcxx-exceptions -fexceptions -o %t.ll
// RUN: FileCheck -check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/mem-expr-fn.cpp b/clang/test/CIR/CodeGen/mem-expr-fn.cpp
index bf2b29a25e858..a2461e4e1bd72 100644
--- a/clang/test/CIR/CodeGen/mem-expr-fn.cpp
+++ b/clang/test/CIR/CodeGen/mem-expr-fn.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/new-null.cpp b/clang/test/CIR/CodeGen/new-null.cpp
index 2f46d89273fad..a549b8e692ee2 100644
--- a/clang/test/CIR/CodeGen/new-null.cpp
+++ b/clang/test/CIR/CodeGen/new-null.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/nofpclass.c b/clang/test/CIR/CodeGen/nofpclass.c
index 6c75c43b2724a..c30b31c623816 100644
--- a/clang/test/CIR/CodeGen/nofpclass.c
+++ b/clang/test/CIR/CodeGen/nofpclass.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _Complex types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -menable-no-infs -menable-no-nans -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/non-odr-use-const-bool.cpp b/clang/test/CIR/CodeGen/non-odr-use-const-bool.cpp
index 6eb7295a864c0..dfce6b85937b8 100644
--- a/clang/test/CIR/CodeGen/non-odr-use-const-bool.cpp
+++ b/clang/test/CIR/CodeGen/non-odr-use-const-bool.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/nrvo.cpp b/clang/test/CIR/CodeGen/nrvo.cpp
index dac5ec941a7a9..31a642b93d5b0 100644
--- a/clang/test/CIR/CodeGen/nrvo.cpp
+++ b/clang/test/CIR/CodeGen/nrvo.cpp
@@ -1,10 +1,10 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-elide-constructors -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t-noelide.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fno-elide-constructors -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t-noelide.cir
// RUN: FileCheck --input-file=%t-noelide.cir %s --check-prefix=CIR-NOELIDE
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/pack-indexing.cpp b/clang/test/CIR/CodeGen/pack-indexing.cpp
index 31e9f4922e5c6..7b408c56a4c05 100644
--- a/clang/test/CIR/CodeGen/pack-indexing.cpp
+++ b/clang/test/CIR/CodeGen/pack-indexing.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _Complex types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++2c -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/paren-list-agg-init.cpp b/clang/test/CIR/CodeGen/paren-list-agg-init.cpp
index 7af20a5ace7f0..c82989fcfab48 100644
--- a/clang/test/CIR/CodeGen/paren-list-agg-init.cpp
+++ b/clang/test/CIR/CodeGen/paren-list-agg-init.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports padded, packed, and over-aligned record shapes.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM,LLVMCIR
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM,OGCG
diff --git a/clang/test/CIR/CodeGen/partial-array-cleanup.cpp b/clang/test/CIR/CodeGen/partial-array-cleanup.cpp
index 11c9629f14c85..83582700ea15f 100644
--- a/clang/test/CIR/CodeGen/partial-array-cleanup.cpp
+++ b/clang/test/CIR/CodeGen/partial-array-cleanup.cpp
@@ -1,9 +1,9 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -fexceptions -fcxx-exceptions -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before-lp.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -fexceptions -fcxx-exceptions -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before-lp.cir
// RUN: FileCheck --input-file=%t-before-lp.cir %s -check-prefix=CIR-BEFORE-LPP
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fexceptions -fcxx-exceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fexceptions -fcxx-exceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fexceptions -fcxx-exceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/record-type-metadata.cpp b/clang/test/CIR/CodeGen/record-type-metadata.cpp
index 2e799782e01c1..c552d833add45 100644
--- a/clang/test/CIR/CodeGen/record-type-metadata.cpp
+++ b/clang/test/CIR/CodeGen/record-type-metadata.cpp
@@ -1,7 +1,7 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class and padded, packed, and
// over-aligned record shapes.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++17 -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
struct Trivial { int x, y; };
diff --git a/clang/test/CIR/CodeGen/three-way-cmp.cpp b/clang/test/CIR/CodeGen/three-way-cmp.cpp
index ac06a66d3e8d0..d1a75677cf207 100644
--- a/clang/test/CIR/CodeGen/three-way-cmp.cpp
+++ b/clang/test/CIR/CodeGen/three-way-cmp.cpp
@@ -1,12 +1,12 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -fno-clangir-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before.cir
// RUN: FileCheck %s --input-file=%t-before.cir --check-prefix=BEFORE,BOTH
// RUN: FileCheck %s --input-file=%t.cir --check-prefix=AFTER
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-after=cir-lowering-prepare %s -o %t.cir 2>&1 | FileCheck %s -check-prefix=AFTER,BOTH
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -fno-clangir-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-after=cir-lowering-prepare %s -o %t.cir 2>&1 | FileCheck %s -check-prefix=AFTER,BOTH
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.ll 2>&1
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t.ll 2>&1
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 -emit-llvm %s -o %t-og.ll 2>&1
diff --git a/clang/test/CIR/CodeGen/trivial-abi.cpp b/clang/test/CIR/CodeGen/trivial-abi.cpp
index a561868bbb33e..0dbe7502ee361 100644
--- a/clang/test/CIR/CodeGen/trivial-abi.cpp
+++ b/clang/test/CIR/CodeGen/trivial-abi.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports padded, packed, and over-aligned record shapes.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++11 -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp b/clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp
index 36e44bdb78cad..95e23435c0a3f 100644
--- a/clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp
+++ b/clang/test/CIR/CodeGen/try-catch-all-with-cleanup.cpp
@@ -1,10 +1,10 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: cir-opt %t.cir -cir-flatten-cfg -o %t-flat.cir
// RUN: FileCheck --input-file=%t-flat.cir %s -check-prefix=CIR-FLAT
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/try-catch-non-trivial-copy.cpp b/clang/test/CIR/CodeGen/try-catch-non-trivial-copy.cpp
index d4fe1ebc20e0c..d40eef535f471 100644
--- a/clang/test/CIR/CodeGen/try-catch-non-trivial-copy.cpp
+++ b/clang/test/CIR/CodeGen/try-catch-non-trivial-copy.cpp
@@ -1,12 +1,12 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: cir-opt -cir-hoist-allocas -cir-flatten-cfg %t.cir -o %t.flat.cir
// RUN: FileCheck --input-file=%t.flat.cir %s -check-prefix=CIR-FLAT
// RUN: cir-opt -cir-hoist-allocas -cir-flatten-cfg -cir-eh-abi-lowering %t.cir -o %t.eh.cir
// RUN: FileCheck --input-file=%t.eh.cir %s -check-prefix=CIR-AFTER-EHABI
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/try-catch.cpp b/clang/test/CIR/CodeGen/try-catch.cpp
index 816f03e2901a6..d97f84979e212 100644
--- a/clang/test/CIR/CodeGen/try-catch.cpp
+++ b/clang/test/CIR/CodeGen/try-catch.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/try-no-throwing-calls.cpp b/clang/test/CIR/CodeGen/try-no-throwing-calls.cpp
index dff7d8c400fd8..492045cb451d5 100644
--- a/clang/test/CIR/CodeGen/try-no-throwing-calls.cpp
+++ b/clang/test/CIR/CodeGen/try-no-throwing-calls.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/unary.cpp b/clang/test/CIR/CodeGen/unary.cpp
index e6f5046df4a73..12da94602fca3 100644
--- a/clang/test/CIR/CodeGen/unary.cpp
+++ b/clang/test/CIR/CodeGen/unary.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the !cir.long_double wrapper and the f16 and f128 types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -Wno-unused-value -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -Wno-unused-value -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -Wno-unused-value -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -Wno-unused-value -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/union.c b/clang/test/CIR/CodeGen/union.c
index c102a181bbe77..7f533956b5f8e 100644
--- a/clang/test/CIR/CodeGen/union.c
+++ b/clang/test/CIR/CodeGen/union.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports padded, packed, and over-aligned record shapes.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/var-arg-aggregate.c b/clang/test/CIR/CodeGen/var-arg-aggregate.c
index c59d97108d7b4..82da7d8fefde1 100644
--- a/clang/test/CIR/CodeGen/var-arg-aggregate.c
+++ b/clang/test/CIR/CodeGen/var-arg-aggregate.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports padded, packed, and over-aligned record shapes.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/vector-binop-overflow.cpp b/clang/test/CIR/CodeGen/vector-binop-overflow.cpp
index e213beab95a61..881f6a584a458 100644
--- a/clang/test/CIR/CodeGen/vector-binop-overflow.cpp
+++ b/clang/test/CIR/CodeGen/vector-binop-overflow.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/vector-convert-to-bool.c b/clang/test/CIR/CodeGen/vector-convert-to-bool.c
index 88a2a13d1a430..e5a9ac6ef269d 100644
--- a/clang/test/CIR/CodeGen/vector-convert-to-bool.c
+++ b/clang/test/CIR/CodeGen/vector-convert-to-bool.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM
diff --git a/clang/test/CIR/CodeGen/vector-ext.cpp b/clang/test/CIR/CodeGen/vector-ext.cpp
index 92b455169ec17..4a1d5a2586850 100644
--- a/clang/test/CIR/CodeGen/vector-ext.cpp
+++ b/clang/test/CIR/CodeGen/vector-ext.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/vector.cpp b/clang/test/CIR/CodeGen/vector.cpp
index 44f0ab10832b9..74d9d1990ad69 100644
--- a/clang/test/CIR/CodeGen/vector.cpp
+++ b/clang/test/CIR/CodeGen/vector.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGen/vtable-linkage-explicit-instantiation.cpp b/clang/test/CIR/CodeGen/vtable-linkage-explicit-instantiation.cpp
index 104a686330f90..ae63d0c4905aa 100644
--- a/clang/test/CIR/CodeGen/vtable-linkage-explicit-instantiation.cpp
+++ b/clang/test/CIR/CodeGen/vtable-linkage-explicit-instantiation.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports padded, packed, and over-aligned record shapes.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGen/vtable-nyi-nonconvertible-functype.cpp b/clang/test/CIR/CodeGen/vtable-nyi-nonconvertible-functype.cpp
index d1273d9ff2d5b..e8e2640a9cb01 100644
--- a/clang/test/CIR/CodeGen/vtable-nyi-nonconvertible-functype.cpp
+++ b/clang/test/CIR/CodeGen/vtable-nyi-nonconvertible-functype.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports padded, packed, and over-aligned record shapes.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM,LLVMCIR --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=LLVM,OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/align-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/align-builtins.c
index a9fea4aa394f1..3b0c660c5455e 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/align-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/align-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -emit-llvm -Wall -Werror %s -o - | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c
index 2632e361b7068..174fcbc7b0080 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx-builtins.c
@@ -1,23 +1,23 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c
index 167117b5ca590..1cb1a3ce46f75 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx-shuffle-builtins.c
@@ -1,15 +1,15 @@
// REQUIRES: x86-registered-target
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir | opt -S -passes=mem2reg
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir | opt -S -passes=mem2reg
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -ffreestanding %s -triple=i386-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir | opt -S -passes=mem2reg
+// RUN: %clang_cc1 -ffreestanding %s -triple=i386-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir | opt -S -passes=mem2reg
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll | opt -S -passes=mem2reg
+// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll | opt -S -passes=mem2reg
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -ffreestanding %s -triple=i386-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll | opt -S -passes=mem2reg
+// RUN: %clang_cc1 -ffreestanding %s -triple=i386-unknown-linux -target-feature +avx -disable-O0-optnone -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll | opt -S -passes=mem2reg
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx -disable-O0-optnone -emit-llvm -o - | opt -S -passes=mem2reg | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx10_2_512bf16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx10_2_512bf16-builtins.c
index 988258dc63de9..70304e382d30b 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx10_2_512bf16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx10_2_512bf16-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx10_2bf16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx10_2bf16-builtins.c
index 6143839c517fb..a289491b6f31b 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx10_2bf16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx10_2bf16-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wno-invalid-feature-combination -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c
index fb2228b426dbf..42bb0947293e0 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c
@@ -1,23 +1,23 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx2 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx2 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c
index ed47eab572d89..d80ec82c9d3ac 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c
@@ -1,7 +1,7 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
-// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
+// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
+// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
// RUN: %clang_cc1 -x c -ffreestanding %s -O2 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
#include <immintrin.h>
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c
index d6974c678e0a7..368a6d5f9360f 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c
@@ -1,7 +1,7 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
-// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
+// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o - -Wall -Werror | FileCheck %s --check-prefixes=CIR
+// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=LLVM
// RUN: %clang_cc1 -x c -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-cpu skylake-avx512 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
#include <immintrin.h>
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512-select-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512-select-builtins.c
index 806f64ef4e3d3..eb9325cd3e735 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512-select-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512-select-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.2 -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c
index bb76c67509fea..48f4a0898d605 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c
@@ -1,15 +1,15 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -emit-llvm -o - -Wall -Werror -Wsign-conversion | FileCheck %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c
index c3fc4e6bb990b..e5d0c2a6c7001 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
index bb36f618255cf..4c3bd1a34149e 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -emit-llvm -o - -Wall -Werror -Wsign-conversion | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512f16c-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512f16c-builtins.c
index bc59776dd51f2..b43d1a86f73da 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512f16c-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512f16c-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -target-feature +avx512f -target-feature +avx512vl -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c
index 18896751c6698..d8adf3b0bda57 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512fp16-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types, the !cir.long_double wrapper, f16, and f128.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512fp16 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c
index 9ed5aa357fb49..cd1cf3da57a7b 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vbmi2-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -target-feature +avx512vbmi2 -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -target-feature +avx512vbmi2 -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -target-feature +avx512vbmi2 -emit-llvm %s -o %t.ll
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -target-feature +avx512vbmi2 -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vbmi2 -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c
index 6066e295753a0..ca44717651e12 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vl-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c
index 614c598ac99cc..1765d2bb80ffd 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbf16-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512f -target-feature +avx512vl -target-feature +avx512bf16 -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbw-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbw-builtins.c
index c6f2f195e7a54..a23a43f4e86ff 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbw-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlbw-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512bw -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.1 -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.1 -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.1 -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx10.1 -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512bw -target-feature +avx512vl -emit-llvm -o - -Wall -Werror -Wsign-conversion | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vldq-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vldq-builtins.c
index c2cc5ed9005db..e2ed32323933a 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vldq-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vldq-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512dq -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512dq -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c
index eb56470ecaee9..7d1fc95405287 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlfp16-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the !cir.long_double wrapper and the f16 and f128 types.
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512fp16 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvbmi2-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvbmi2-builtins.c
index 8bcce00d03acf..ddbc623601239 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvbmi2-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvbmi2-builtins.c
@@ -1,14 +1,14 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vlvbmi2 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
#include <immintrin.h>
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c
index a865e1a4c8c6c..9e585ba895b96 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c
index 1a3364562d5ca..54a02109dcb46 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +avx512vp2intersect -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/cmp-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/cmp-builtins.c
index b609e74b83527..ee97356ccfa15 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/cmp-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/cmp-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -target-feature +avx512bw -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -target-feature +avx512bw -emit-llvm -Wall -Werror %s -o - | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/keylocker.c b/clang/test/CIR/CodeGenBuiltins/X86/keylocker.c
index 4090ea9c1f0b2..25ee25da05b7a 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/keylocker.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/keylocker.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +kl -target-feature +widekl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +kl -target-feature +widekl -emit-llvm -Wall -Werror %s -o - | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/permd-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/permd-builtins.c
index bb5e154804f4c..18fe6aefb306e 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/permd-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/permd-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -x c++ -ffreestanding -triple x86_64-unknown-linux -target-feature +avx512vl -Wno-implicit-function-declaration -fclangir -fno-clangir-call-conv-lowering -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 -target-feature +avx512vl -emit-llvm -Wall -Werror %s -o - | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c
index 1da685a914c8d..6fffc4c56558d 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c
@@ -1,10 +1,10 @@
// Test X86-specific sqrt builtins
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +avx512f -target-feature +avx512fp16 -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c
index c332bcb58c74c..8a584e898287c 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c
index 0936b0df41c63..f848ba5c0434d 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse2 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse2 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c
index 45b40dd7782c8..7542782bbe0c5 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c
@@ -1,21 +1,21 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror -Wsign-conversion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +sse4.1 -emit-llvm -o - -Wall -Werror -Wsign-conversion | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/ssse3-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/ssse3-builtins.c
index f8362d593b87d..1528f9597ada4 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/ssse3-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/ssse3-builtins.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +ssse3 -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +ssse3 -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefixes=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +ssse3 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +ssse3 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s --check-prefixes=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/vec-set-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/vec-set-builtins.c
index b003259c3b18e..636e6909dd1fa 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/vec-set-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/vec-set-builtins.c
@@ -1,13 +1,13 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -fno-clangir-call-conv-lowering -emit-cir -o %t.cir -Wall -Werror
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll -Wall -Werror
// RUN: FileCheck --check-prefixes=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-unknown-linux -target-feature +sse4.1 -target-feature +avx -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/X86/xop-builtins.c b/clang/test/CIR/CodeGenBuiltins/X86/xop-builtins.c
index 55a8949e50cef..c63c7129b94ba 100644
--- a/clang/test/CIR/CodeGenBuiltins/X86/xop-builtins.c
+++ b/clang/test/CIR/CodeGenBuiltins/X86/xop-builtins.c
@@ -1,23 +1,23 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-cir -clangir-disable-call-conv-lowering -o %t.cir
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-cir -fno-clangir-call-conv-lowering -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-cir -clangir-disable-call-conv-lowering -o %t.cir
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-cir -fno-clangir-call-conv-lowering -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-cir -clangir-disable-call-conv-lowering -o %t.cir
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-cir -fno-clangir-call-conv-lowering -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-cir -clangir-disable-call-conv-lowering -o %t.cir
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -emit-cir -fno-clangir-call-conv-lowering -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
-// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -x c++ -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -fno-signed-char -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
// RUN: %clang_cc1 -x c -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +xop -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
index 94199940e6ab0..42daa8ea3f10b 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-bit.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports _BitInt wider than 128 bits.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp
index e77c2adca5807..121acb68264c4 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-call.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the !cir.long_double wrapper and the f16 and f128 types.
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c b/clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c
index d38ca5daeed1a..1f8a815e7eec8 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-fcmp-sse.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-float.c b/clang/test/CIR/CodeGenBuiltins/builtin-float.c
index 3b68581c370fa..b2ad65799e926 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-float.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-float.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the !cir.long_double wrapper and the f16 and f128 types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-isfpclass.c b/clang/test/CIR/CodeGenBuiltins/builtin-isfpclass.c
index b85d24c4bd34d..0fbecc8b8441f 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-isfpclass.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-isfpclass.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the !cir.long_double wrapper and the f16 and f128 types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-reduce-bitwise.c b/clang/test/CIR/CodeGenBuiltins/builtin-reduce-bitwise.c
index 092fa23e74bf3..bd756408b6571 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-reduce-bitwise.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-reduce-bitwise.c
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp b/clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp
index fde7d3a5086f1..6814f14ab821e 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-undef-rvalue.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -verify %s -o - > %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir -verify %s -o - > %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -verify %s -o - > %t.ll
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm -verify %s -o - > %t.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
typedef int v4si __attribute__((vector_size(16)));
diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise-bool-nyi.c b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise-bool-nyi.c
index ff0ae08f14fa5..73b31e8f5b569 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtins-elementwise-bool-nyi.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtins-elementwise-bool-nyi.c
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports vector types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering %s -verify -emit-cir -o -
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering %s -verify -emit-cir -o -
typedef _Bool vbool4 __attribute__((ext_vector_type(4)));
diff --git a/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c b/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
index ca697cea84592..564e05dae4550 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtins-floating-point.c
@@ -1,10 +1,10 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the !cir.long_double wrapper and the f16 and f128 types.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
-// RUN: %clang_cc1 -triple aarch64-apple-darwin-macho -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t-aarch64.cir
+// RUN: %clang_cc1 -triple aarch64-apple-darwin-macho -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t-aarch64.cir
// RUN: FileCheck --input-file=%t-aarch64.cir %s --check-prefix=AARCH64
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o %t.ll %s
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o %t-ogcg.ll %s
// RUN: FileCheck --input-file=%t-ogcg.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp b/clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp
index dd6a8c3ab3467..be5465d9ba510 100644
--- a/clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp
+++ b/clang/test/CIR/CodeGenCXX/typeid-most-derived.cpp
@@ -1,9 +1,9 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports padded, packed, and over-aligned record shapes.
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before.cir
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o %t.cir 2> %t-before.cir
// RUN: FileCheck %s --input-file=%t-before.cir --check-prefixes=CIR
// RUN: FileCheck %s --input-file=%t.cir --check-prefixes=CIR
-// RUN: %clang_cc1 %s -triple %itanium_abi_triple -Wno-unused-value -std=c++11 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -o - -std=c++11 | FileCheck %s --check-prefixes=CIR-TO-LLVM
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -Wno-unused-value -std=c++11 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -o - -std=c++11 | FileCheck %s --check-prefixes=CIR-TO-LLVM
// RUN: %clang_cc1 %s -triple %itanium_abi_triple -Wno-unused-value -std=c++11 -emit-llvm -o - -std=c++11 | FileCheck %s --check-prefixes=LLVM
// FIXME: missing `inbounds` in `getelementptr` in CIR-TO-LLVM output.
diff --git a/clang/test/CIR/CodeGenCXX/typeid.cpp b/clang/test/CIR/CodeGenCXX/typeid.cpp
index 33e42aa94059e..b5c350f9fd4fb 100644
--- a/clang/test/CIR/CodeGenCXX/typeid.cpp
+++ b/clang/test/CIR/CodeGenCXX/typeid.cpp
@@ -1,9 +1,9 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports the builtin i32 in the Itanium EH personality signature.
-// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -fclangir -clangir-disable-call-conv-lowering -emit-cir -fcxx-exceptions -fexceptions -mmlir --mlir-print-ir-before=cir-cxxabi-lowering -o %t.cir 2> %t-before.cir
+// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -fclangir -fno-clangir-call-conv-lowering -emit-cir -fcxx-exceptions -fexceptions -mmlir --mlir-print-ir-before=cir-cxxabi-lowering -o %t.cir 2> %t-before.cir
// RUN: FileCheck %s --input-file=%t-before.cir --check-prefixes=CIR,CIR-BEFORE
// RUN: FileCheck %s --input-file=%t.cir --check-prefixes=CIR,CIR-AFTER
-// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -fclangir -clangir-disable-call-conv-lowering -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s --check-prefixes=LLVM
+// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -fclangir -fno-clangir-call-conv-lowering -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s --check-prefixes=LLVM
// RUN: %clang_cc1 -I%S/Inputs %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s --check-prefixes=LLVM
#include <typeinfo>
diff --git a/clang/test/CIR/CodeGenCXX/uncopyable-args.cpp b/clang/test/CIR/CodeGenCXX/uncopyable-args.cpp
index 94251ce8171be..7aa17c17d17eb 100644
--- a/clang/test/CIR/CodeGenCXX/uncopyable-args.cpp
+++ b/clang/test/CIR/CodeGenCXX/uncopyable-args.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp b/clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp
index fc0508ec31f40..7270c36df7df6 100644
--- a/clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp
+++ b/clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp
@@ -1,9 +1,9 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class and padded, packed, and
// over-aligned record shapes.
-// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
-// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-unknown-unknown -emit-llvm %s -o %t.ll
// RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s
diff --git a/clang/test/CIR/CodeGenCoroutines/coro-exceptions.cpp b/clang/test/CIR/CodeGenCoroutines/coro-exceptions.cpp
index e2c812471faec..3887a0b10783f 100644
--- a/clang/test/CIR/CodeGenCoroutines/coro-exceptions.cpp
+++ b/clang/test/CIR/CodeGenCoroutines/coro-exceptions.cpp
@@ -1,7 +1,7 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class and a bare-variadic
// declaration with no named parameter.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// FIXME: we currently don't have flatten-cfg for coroutines or lower to LLVM-IR
diff --git a/clang/test/CIR/CodeGenCoroutines/coro-task.cpp b/clang/test/CIR/CodeGenCoroutines/coro-task.cpp
index 464a19ca9e6a2..cc9de5250996d 100644
--- a/clang/test/CIR/CodeGenCoroutines/coro-task.cpp
+++ b/clang/test/CIR/CodeGenCoroutines/coro-task.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm -disable-llvm-passes %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=OGCG
diff --git a/clang/test/CIR/CodeGenOpenACC/atomic-capture.cpp b/clang/test/CIR/CodeGenOpenACC/atomic-capture.cpp
index 425f5cc28bceb..b65b18804466f 100644
--- a/clang/test/CIR/CodeGenOpenACC/atomic-capture.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/atomic-capture.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
struct HasOps {
operator float();
diff --git a/clang/test/CIR/CodeGenOpenACC/atomic-update.cpp b/clang/test/CIR/CodeGenOpenACC/atomic-update.cpp
index 53e6d91c6b31a..90f025ba9f0cc 100644
--- a/clang/test/CIR/CodeGenOpenACC/atomic-update.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/atomic-update.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
struct HasOps {
operator float();
diff --git a/clang/test/CIR/CodeGenOpenACC/atomic-write.cpp b/clang/test/CIR/CodeGenOpenACC/atomic-write.cpp
index 7ad798dca0e9d..ca2ef838a5685 100644
--- a/clang/test/CIR/CodeGenOpenACC/atomic-write.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/atomic-write.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -triple x86_64-linux-gnu -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering -triple x86_64-linux-pc %s -o - | FileCheck %s
extern "C" bool condition(int x, unsigned int y, float f);
extern "C" double do_thing(float f);
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-copy.cpp b/clang/test/CIR/CodeGenOpenACC/declare-copy.cpp
index 1d5b075e29ac9..f11de8e7f9e15 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-copy.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-copy.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp b/clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp
index dd1ecd0286d60..9f9e9d1d207a9 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp b/clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp
index 53f65daa828ab..6e5be6be8a035 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-create.cpp b/clang/test/CIR/CodeGenOpenACC/declare-create.cpp
index 4c55957f30159..df948a503366f 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-create.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-create.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-deviceresident.cpp b/clang/test/CIR/CodeGenOpenACC/declare-deviceresident.cpp
index 3919a7ed49382..b06efef022aba 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-deviceresident.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-deviceresident.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/declare-present.cpp b/clang/test/CIR/CodeGenOpenACC/declare-present.cpp
index 88368a4452f0f..b94db5f0a87ca 100644
--- a/clang/test/CIR/CodeGenOpenACC/declare-present.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/declare-present.cpp
@@ -1,7 +1,7 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o %t.cir
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering %s -o %t.cir
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering %s -o - | FileCheck %s
struct HasSideEffects {
HasSideEffects();
diff --git a/clang/test/CIR/CodeGenOpenACC/private-clause-coerced-ctor.cpp b/clang/test/CIR/CodeGenOpenACC/private-clause-coerced-ctor.cpp
index 9652c6ce55e2f..2c5a7f557f385 100644
--- a/clang/test/CIR/CodeGenOpenACC/private-clause-coerced-ctor.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/private-clause-coerced-ctor.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fopenacc -triple x86_64-unknown-linux-gnu -fclangir \
-// RUN: -clangir-enable-call-conv-lowering -emit-cir %s -o - | FileCheck %s
+// RUN: -fclangir-call-conv-lowering -emit-cir %s -o - | FileCheck %s
struct Pair {
long a, b;
diff --git a/clang/test/CIR/CodeGenOpenACC/routine-bind.cpp b/clang/test/CIR/CodeGenOpenACC/routine-bind.cpp
index baa7cb5057726..2e634917c101a 100644
--- a/clang/test/CIR/CodeGenOpenACC/routine-bind.cpp
+++ b/clang/test/CIR/CodeGenOpenACC/routine-bind.cpp
@@ -1,6 +1,6 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -clangir-disable-call-conv-lowering %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-self-if-potential-conflict -emit-cir -fclangir -fno-clangir-call-conv-lowering %s -o - | FileCheck %s
// FIXME: We should run this against Windows mangling as well at one point.
#pragma acc routine seq bind("BIND1")
diff --git a/clang/test/CIR/CodeGenSYCL/kernel-call-stmt.cpp b/clang/test/CIR/CodeGenSYCL/kernel-call-stmt.cpp
index 894b4e734f2ce..39f66fbc240f1 100644
--- a/clang/test/CIR/CodeGenSYCL/kernel-call-stmt.cpp
+++ b/clang/test/CIR/CodeGenSYCL/kernel-call-stmt.cpp
@@ -1,8 +1,8 @@
-// TODO(cir): drop -clangir-disable-call-conv-lowering once CallConvLowering
+// TODO(cir): drop -fno-clangir-call-conv-lowering once CallConvLowering
// supports parameters of an empty or tag class.
-// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-cir %s -o %t.cir
+// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-cir %s -o %t.cir
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
-// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -fclangir -clangir-disable-call-conv-lowering -emit-llvm %s -o %t-cir.ll
+// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-call-conv-lowering -emit-llvm %s -o %t-cir.ll
// RUN: FileCheck --input-file=%t-cir.ll %s -check-prefix=LLVM
// RUN: %clang_cc1 -std=c++20 -fsycl-is-host -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=OGCG
>From fc83025c4d98d5b5a7b70ca08b43374171feeaf3 Mon Sep 17 00:00:00 2001
From: Adam Smith <adams at nvidia.com>
Date: Mon, 10 Aug 2026 14:26:40 -0700
Subject: [PATCH 3/5] [CIR] Drop stale and unnecessary comments from the
callconv tests
The `FIXME(cir)` in `atomic.c` blamed the LLVM and OGCG difference on ABI
lowering not being implemented, which the default flip makes untrue: the
argument is now coerced to `i24` on both sides. What is left is a coerce
round-trip and a `memset` alignment, so the comment names the wrong cause
and is removed rather than reworded.
Also drops the explanatory comments added above CHECK groups across the
regenerated tests, which restate what the checks below them already show.
The two `noalias` markers stay, and the `byref` difference in
`lambda-dtor-field.cpp` becomes a marker in the same form, since both
record a difference from classic rather than describing the checks.
Assisted-by: Cursor / claude-opus-5
---
clang/test/CIR/CodeGen/atomic.c | 2 --
clang/test/CIR/CodeGen/call-conv-lowering-flag.c | 3 ---
clang/test/CIR/CodeGen/call.c | 5 -----
clang/test/CIR/CodeGen/call.cpp | 4 ----
clang/test/CIR/CodeGen/cast.c | 2 --
clang/test/CIR/CodeGen/convert-incomplete-type.cpp | 2 --
clang/test/CIR/CodeGen/global-decomp-decls.cpp | 2 --
clang/test/CIR/CodeGen/instantiate-init.cpp | 2 --
clang/test/CIR/CodeGen/label.c | 2 --
clang/test/CIR/CodeGen/lambda-dtor-field.cpp | 6 ++----
clang/test/CIR/CodeGen/lambda.cpp | 2 --
clang/test/CIR/CodeGen/non-scalar-lval-return.cpp | 4 ----
clang/test/CIR/CodeGen/ret-attrs.cpp | 2 --
clang/test/CIR/CodeGen/struct.cpp | 2 --
clang/test/CIR/CodeGen/temp-param-obj-decl.cpp | 1 -
clang/test/CIR/CodeGen/thunks.cpp | 2 --
clang/test/CIR/CodeGen/union-agg-init.c | 4 ----
clang/test/CIR/CodeGen/union-agg-init.cpp | 3 ---
clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c | 1 -
clang/test/CIR/CodeGenCUDA/kernel-call.cu | 1 -
20 files changed, 2 insertions(+), 50 deletions(-)
diff --git a/clang/test/CIR/CodeGen/atomic.c b/clang/test/CIR/CodeGen/atomic.c
index a8a7779e83256..f9d6f3c4b54e1 100644
--- a/clang/test/CIR/CodeGen/atomic.c
+++ b/clang/test/CIR/CodeGen/atomic.c
@@ -3768,8 +3768,6 @@ void store_atomic_different_size(S a) {
// CIR: %[[DATA:.*]] = cir.load {{.*}} %[[ATOMIC_TMP_U32]] : !cir.ptr<!u32i>, !u32i
// CIR: cir.store {{.*}} syncscope(system) atomic(seq_cst) %[[DATA]], %[[B_VOID_PTR]] : !u32i, !cir.ptr<!u32i>
- // FIXME(cir): The difference below is due to ABI lowering not being fully implemented for CIR.
-
// LLVM: %[[COERCE:.*]] = alloca i24, i64 1, align 4
// LLVM: store i24 %{{.+}}, ptr %[[COERCE]], align 4
// LLVM: %[[A:.*]] = load %struct.S, ptr %[[COERCE]], align 1
diff --git a/clang/test/CIR/CodeGen/call-conv-lowering-flag.c b/clang/test/CIR/CodeGen/call-conv-lowering-flag.c
index c29df7b7ee282..7ca03dd9f347b 100644
--- a/clang/test/CIR/CodeGen/call-conv-lowering-flag.c
+++ b/clang/test/CIR/CodeGen/call-conv-lowering-flag.c
@@ -16,9 +16,6 @@
typedef struct { long a, b, c, d; } Big;
-// A 32-byte record returns through memory once the pass runs, and first-class
-// otherwise, so the signature alone says whether the pass ran. The ON
-// signature is also what classic CodeGen emits, which the last RUN line pins.
Big ret_big(long a) {
Big b = {a, a, a, a};
return b;
diff --git a/clang/test/CIR/CodeGen/call.c b/clang/test/CIR/CodeGen/call.c
index 2c2bacd360643..b128a741d66cb 100644
--- a/clang/test/CIR/CodeGen/call.c
+++ b/clang/test/CIR/CodeGen/call.c
@@ -16,7 +16,6 @@ void f2(void) {
f1(s);
}
-// S is one eightbyte of INTEGER class, so it is passed as one i64.
// CIR-LABEL: cir.func{{.*}} @f2(){{.*}} {
// CIR: %[[COERCE:.+]] = cir.alloca "coerce" align(8) : !cir.ptr<!rec_S>
// CIR: %[[S:.+]] = cir.load align(4) %{{.+}} : !cir.ptr<!rec_S>, !rec_S
@@ -72,8 +71,6 @@ void f7(void) {
f5(b);
}
-// Big is 40 bytes, so it goes to memory: the caller allocates the copy and
-// passes it byval.
// CIR-LABEL: cir.func{{.*}} @f7(){{.*}} {
// CIR: %[[B:.+]] = cir.load align(4) %{{.+}} : !cir.ptr<!rec_Big>, !rec_Big
// CIR-NEXT: %[[SLOT:.+]] = cir.alloca "byval" align(8) : !cir.ptr<!rec_Big>
@@ -111,8 +108,6 @@ void f9(void) {
f1(f3());
}
-// The result of f3 is coerced out of a slot and the argument to f1 is coerced
-// back into one, so this function carries a coerce slot for each direction.
// CIR-LABEL: cir.func{{.*}} @f9(){{.*}} {
// CIR: %[[RETSLOT:.+]] = cir.alloca "coerce" align(8) : !cir.ptr<!u64i>
// CIR-NEXT: %[[ARGSLOT:.+]] = cir.alloca "coerce" align(8) : !cir.ptr<!rec_S>
diff --git a/clang/test/CIR/CodeGen/call.cpp b/clang/test/CIR/CodeGen/call.cpp
index 9a8141704aa7b..8c60f99d98d61 100644
--- a/clang/test/CIR/CodeGen/call.cpp
+++ b/clang/test/CIR/CodeGen/call.cpp
@@ -83,8 +83,6 @@ void f11() {
S s = f10();
}
-// S is returned in a register, so the result lands in a coerce slot and is
-// reloaded as a record.
// CIR-LABEL: cir.func{{.*}} @_Z3f11v()
// CIR: %[[#coerce:]] = cir.alloca "coerce" align(8) : !cir.ptr<!u64i>
// CIR: %[[#ret:]] = cir.call @_Z3f10v() : () -> !u64i
@@ -100,8 +98,6 @@ void f11() {
// LLVM-NEXT: %[[#s:]] = load %struct.S, ptr %[[#coerce]], align 4
// LLVM-NEXT: store %struct.S %[[#s]], ptr %{{.+}}, align 4
-// Both backends return S in one register. CIR reads it back through an i64
-// coerce slot, where classic stores the register straight into the object.
// OGCG-LABEL: define{{.*}} void @_Z3f11v(){{.*}}
// OGCG: %[[S:.+]] = alloca %struct.S, align 4
// OGCG: %[[RET:.+]] = call i64 @_Z3f10v()
diff --git a/clang/test/CIR/CodeGen/cast.c b/clang/test/CIR/CodeGen/cast.c
index b2e30c06d5bde..a57369dd2ad65 100644
--- a/clang/test/CIR/CodeGen/cast.c
+++ b/clang/test/CIR/CodeGen/cast.c
@@ -46,8 +46,6 @@ union Union toUnionAssign() {
// LLVM: store i32 42, ptr %[[RET_ALLOCA]]
// OGCG: store i32 42, ptr %[[RET_ALLOCA]]
return u;
- // The union is returned in a register, so the result is reloaded from the
- // coerce slot as i32 rather than returned as a record.
// CIR: %[[LOAD:.*]] = cir.load %[[RET_ALLOCA]] : !cir.ptr<!rec_Union>, !rec_Union
// CIR: cir.store %[[LOAD]], %[[COERCE]] : !rec_Union, !cir.ptr<!rec_Union>
// CIR: %[[COERCE_TO_INT:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_Union> -> !cir.ptr<!s32i>
diff --git a/clang/test/CIR/CodeGen/convert-incomplete-type.cpp b/clang/test/CIR/CodeGen/convert-incomplete-type.cpp
index c196ed282bdc3..8737855c9d446 100644
--- a/clang/test/CIR/CodeGen/convert-incomplete-type.cpp
+++ b/clang/test/CIR/CodeGen/convert-incomplete-type.cpp
@@ -21,8 +21,6 @@ void use() {
// CIR: cir.func {{.*}} @_Z3usev()
// CIR: %[[FP:.*]] = cir.get_global @fp
// CIR: %[[LOAD:.*]] = cir.load {{.*}} %[[FP]]
-// A single-int record is returned in a register, so the indirect callee is
-// bitcast to a function returning !s32i before the call.
// CIR: %[[FN:.*]] = cir.cast bitcast %[[LOAD]] : !cir.ptr<!cir.func<() -> !rec_Delayed>> -> !cir.ptr<!cir.func<() -> !s32i>>
// CIR: cir.call %[[FN]]() : (!cir.ptr<!cir.func<() -> !s32i>>) -> !s32i
diff --git a/clang/test/CIR/CodeGen/global-decomp-decls.cpp b/clang/test/CIR/CodeGen/global-decomp-decls.cpp
index 493bfee4f2070..d0e0c5f1990c0 100644
--- a/clang/test/CIR/CodeGen/global-decomp-decls.cpp
+++ b/clang/test/CIR/CodeGen/global-decomp-decls.cpp
@@ -29,8 +29,6 @@ auto [t1, t2, t3] = t;
// LLVM: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}}@_ZDC2t12t22t3E, ptr {{.*}}@t, i64 12, i1 false)
const auto & [t11, t12, t13] = getT<Type>();
-// A three-int record spans two eightbytes, so it is returned in a register
-// pair.
// CIR: cir.func {{.*}} @_Z4getTI4TypeEDav() -> !rec_anon_struct
// CIR: cir.global external @_ZDC3t113t123t13E = #cir.ptr<null> : !cir.ptr<!rec_Type>
diff --git a/clang/test/CIR/CodeGen/instantiate-init.cpp b/clang/test/CIR/CodeGen/instantiate-init.cpp
index 230de6f1155b9..aa4d9ce6a78f3 100644
--- a/clang/test/CIR/CodeGen/instantiate-init.cpp
+++ b/clang/test/CIR/CodeGen/instantiate-init.cpp
@@ -24,8 +24,6 @@ void init_vec_using_initalizer_list() {
Vector vec = {0, 1, 2};
}
-// std::initializer_list<int> is two eightbytes, so the constructor takes the
-// data pointer and the size as separate register arguments.
// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_std3A3Ainitializer_list3Cint3E>
// CIR: %[[VEC_ADDR:.*]] = cir.alloca "vec" {{.*}} init : !cir.ptr<!rec_Vector>
// CIR: %[[AGG_ADDR:.*]] = cir.alloca "agg.tmp0" {{.*}} : !cir.ptr<!rec_std3A3Ainitializer_list3Cint3E>
diff --git a/clang/test/CIR/CodeGen/label.c b/clang/test/CIR/CodeGen/label.c
index 8c104f1fccf5e..d79a0bdd03fc1 100644
--- a/clang/test/CIR/CodeGen/label.c
+++ b/clang/test/CIR/CodeGen/label.c
@@ -190,8 +190,6 @@ void foo() {
// LLVM:2:
// LLVM: br label %3
// LLVM:3:
-// An empty struct occupies no eightbytes, so neither the return value nor the
-// argument is passed.
// LLVM: call void @get()
// LLVM: call void @bar()
diff --git a/clang/test/CIR/CodeGen/lambda-dtor-field.cpp b/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
index 4fab405bd93ad..21ebf44a28221 100644
--- a/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
+++ b/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
@@ -34,10 +34,8 @@ void capture_one(S s) {
// LLVM: call void @_ZN1SD1Ev(ptr {{.*}} %[[FIELD1]])
// LLVM: ret void
-// A non-trivially-copyable class is passed indirectly, so the parameter is a
-// pointer to the caller's object and no local copy is allocated. CIR marks
-// that pointer byref where classic CodeGen leaves it a plain noundef pointer,
-// so the two signatures are pinned separately.
+// TODO(cir): CIR marks the indirect parameter byref and drops noundef where
+// classic CodeGen emits a plain noundef pointer.
// LLVM-LABEL: define dso_local void @_Z11capture_one1S(
// LLVM-SAME: ptr byref(%struct.S) align 4 %[[S_ARG:[^,)]+]])
// LLVM: %[[LAM1:.*]] = alloca %[[LAM_TY_1]]
diff --git a/clang/test/CIR/CodeGen/lambda.cpp b/clang/test/CIR/CodeGen/lambda.cpp
index b742c6c48975f..e844311b6972f 100644
--- a/clang/test/CIR/CodeGen/lambda.cpp
+++ b/clang/test/CIR/CodeGen/lambda.cpp
@@ -157,8 +157,6 @@ auto g() {
};
}
-// A lambda capturing one reference is a single-pointer record, so it is
-// returned in a register.
// CIR: cir.func {{.*}} @_Z1gv() -> !cir.ptr<!void> attributes {{{.*}}nothrow} {
// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<![[REC_LAM_G:.*]]>
// CIR: %[[RETVAL:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<![[REC_LAM_G]]>
diff --git a/clang/test/CIR/CodeGen/non-scalar-lval-return.cpp b/clang/test/CIR/CodeGen/non-scalar-lval-return.cpp
index caf7f60e41e10..2658bd0aee4d9 100644
--- a/clang/test/CIR/CodeGen/non-scalar-lval-return.cpp
+++ b/clang/test/CIR/CodeGen/non-scalar-lval-return.cpp
@@ -12,16 +12,12 @@ struct Struct {
extern "C" Struct getStruct(int i) { return i; }
-// A single-int record fits in one eightbyte, so it is returned in a register.
// CIR: cir.func {{.*}} @getStruct(%{{[^,)]+}}: !s32i {{.*}}) -> !s32i
// LLVM: define dso_local i32 @getStruct(i32 noundef %{{[^,)]+}})
extern "C" void use() {
int g = getStruct(0).member;
- // The register-returned i32 lands in a coerce slot that is then reread as a
- // Struct. Classic CodeGen instead stores it straight through a GEP to the
- // first member.
// CIR-LABEL: @use()
// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!s32i>
// CIR: %[[G_ALLOCA:.*]] = cir.alloca "g" {{.*}} init : !cir.ptr<!s32i>
diff --git a/clang/test/CIR/CodeGen/ret-attrs.cpp b/clang/test/CIR/CodeGen/ret-attrs.cpp
index f9e525d930d56..9020946aeec04 100644
--- a/clang/test/CIR/CodeGen/ret-attrs.cpp
+++ b/clang/test/CIR/CodeGen/ret-attrs.cpp
@@ -52,8 +52,6 @@ void calls(MemPtrTy mpt) {
// LLVM: call void @_Z16not_noundef_voidv()
not_noundef_memptr(mpt);
- // A member function pointer is two eightbytes, so it is expanded into a
- // pair of i64 arguments.
// CIR: cir.call @_Z18not_noundef_memptrM6StructFvvE(%{{.+}}, %{{.+}}) : (!s64i, !s64i) -> !rec_anon_struct
// LLVM: call { i64, i64 } @_Z18not_noundef_memptrM6StructFvvE(i64 %{{.+}}, i64 %{{.+}})
diff --git a/clang/test/CIR/CodeGen/struct.cpp b/clang/test/CIR/CodeGen/struct.cpp
index 76f1c6c638c1d..12fd3d8ac4ad8 100644
--- a/clang/test/CIR/CodeGen/struct.cpp
+++ b/clang/test/CIR/CodeGen/struct.cpp
@@ -340,8 +340,6 @@ void calling_function_with_default_values() {
function_arg_with_default_value();
}
-// CompleteS is 8 bytes of INTEGER class, so it is passed as one i64 out of a
-// coerce slot.
// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_CompleteS>
// CIR: %[[AGG_ADDR:.*]] = cir.alloca "agg.tmp0" {{.*}} : !cir.ptr<!rec_CompleteS>
// CIR: %[[ELEM_0_PTR:.*]] = cir.get_member %[[AGG_ADDR]][0] {name = "a"} : !cir.ptr<!rec_CompleteS> -> !cir.ptr<!s32i>
diff --git a/clang/test/CIR/CodeGen/temp-param-obj-decl.cpp b/clang/test/CIR/CodeGen/temp-param-obj-decl.cpp
index fe9f418ffa2d0..fc04058ad7e00 100644
--- a/clang/test/CIR/CodeGen/temp-param-obj-decl.cpp
+++ b/clang/test/CIR/CodeGen/temp-param-obj-decl.cpp
@@ -47,7 +47,6 @@ HasMem get_m() { return m; }
// CIR: %[[GET_GLOB:.*]] = cir.get_global @_ZTAXtl6HasMemLi2EEE : !cir.ptr<!rec_HasMem>
// CIR: cir.copy %[[GET_GLOB]] align(4) to %[[RET_ALLOCA]] align(4) : !cir.ptr<!rec_HasMem>
//
-// A single-int record fits in one eightbyte, so it is returned as i32.
// LLVM-BOTH-LABEL: define linkonce_odr i32 @_Z5get_mIXtl6HasMemLi2EEEES0_v()
// LLVM-BOTH: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}}%[[RET_ALLOCA:.*]], ptr {{.*}}@_ZTAXtl6HasMemLi2EEE, i64 4, i1 false)
// LLVM: %[[LOAD_RET:.*]] = load %struct.HasMem, ptr %[[RET_ALLOCA]]
diff --git a/clang/test/CIR/CodeGen/thunks.cpp b/clang/test/CIR/CodeGen/thunks.cpp
index cfa5aa242cb31..5ec846350d115 100644
--- a/clang/test/CIR/CodeGen/thunks.cpp
+++ b/clang/test/CIR/CodeGen/thunks.cpp
@@ -250,8 +250,6 @@ void C::f(int x, ...) {}
// CIR: cir.func {{.*}} @_ZN5Test51C1hEv
-// A non-trivial class is returned indirectly, so the thunk forwards the sret
-// pointer it was given straight to the callee.
// CIR: cir.func {{.*}} @_ZThn8_N5Test51C1hEv(%arg0: !cir.ptr<!rec_Test53A3ANonTrivial> {{.*}}llvm.sret = !rec_Test53A3ANonTrivial{{.*}}, %arg1: !cir.ptr<
// CIR: %[[T5_THIS_ADDR:.*]] = cir.alloca "this" {{.*}} init
// CIR: cir.store %arg1, %[[T5_THIS_ADDR]]
diff --git a/clang/test/CIR/CodeGen/union-agg-init.c b/clang/test/CIR/CodeGen/union-agg-init.c
index 4862b09d90b12..ab603d24d8712 100644
--- a/clang/test/CIR/CodeGen/union-agg-init.c
+++ b/clang/test/CIR/CodeGen/union-agg-init.c
@@ -17,8 +17,6 @@ typedef union vec3 {
// In C mode, this does do zero padding.
vec3 ret_vec3() {
- // A 24-byte union does not fit in registers, so it is returned through an
- // sret pointer and the members are written directly into it.
// CIR-LABEL: cir.func {{.*}} @ret_vec3
// CIR-SAME: (%[[RET_ALLOCA:.*]]: !cir.ptr<!rec_vec3> {{.*}}llvm.sret = !rec_vec3{{.*}})
// CIR: %[[GET_ANON:.*]] = cir.get_member %[[RET_ALLOCA]][0] {name = ""}
@@ -61,8 +59,6 @@ struct outer ret_outer() {
// CIR: %[[GET_GLOB:.*]] = cir.get_global @__const.ret_outer.__retval : !cir.ptr<!rec_outer>
// CIR: cir.copy %[[GET_GLOB]] to %[[RET_ALLOCA]] : !cir.ptr<!rec_outer>
- // A 16-byte record spans two eightbytes, so it is returned in a register
- // pair.
// LLVM-LABEL: define dso_local { i64, i32 } @ret_outer()
// LLVM: call void @llvm.memcpy.p0.p0.i64(ptr {{.*}}%[[RET_ALLOCA:.*]], ptr {{.*}}@__const.ret_outer.{{.*}}, i64 16, i1 false)
// LLVMCIR: %[[OUTER:.*]] = load %struct.outer, ptr %[[RET_ALLOCA]]
diff --git a/clang/test/CIR/CodeGen/union-agg-init.cpp b/clang/test/CIR/CodeGen/union-agg-init.cpp
index 0c8a7239229fe..86c94c596572c 100644
--- a/clang/test/CIR/CodeGen/union-agg-init.cpp
+++ b/clang/test/CIR/CodeGen/union-agg-init.cpp
@@ -12,8 +12,6 @@ typedef union vec3 {
// In C++ mode, this doesn't do zero padding.
extern "C" vec3 ret_vec3() {
- // A 24-byte union does not fit in registers, so it is returned through an
- // sret pointer and the members are written directly into it.
// CIR-LABEL: cir.func {{.*}} @ret_vec3
// CIR-SAME: (%[[RET_ALLOCA:.*]]: !cir.ptr<!rec_vec3> {{.*}}llvm.sret = !rec_vec3{{.*}})
// CIR: %[[GET_ANON:.*]] = cir.get_member %[[RET_ALLOCA]][0] {name = ""}
@@ -43,7 +41,6 @@ typedef union Trivial {
} Trivial;
extern "C" Trivial ret_trivial() { return {}; }
- // A single-int union fits in one eightbyte, so it is returned as i32.
// CIR-LABEL: cir.func {{.*}} @ret_trivial() -> !s32i
// CIR: %[[COERCE:.*]] = cir.alloca "coerce" {{.*}} : !cir.ptr<!rec_Trivial>
// CIR: %[[RET_ALLOCA:.*]] = cir.alloca "__retval" {{.*}} : !cir.ptr<!rec_Trivial>
diff --git a/clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c b/clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c
index b475469ac9ea9..32dd4eac69335 100644
--- a/clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c
+++ b/clang/test/CIR/CodeGenBuiltins/builtin-constant-p.c
@@ -23,7 +23,6 @@ struct foo test0(int expr) {
return f;
}
-// A two-int record fits in one eightbyte, so it is returned as i64.
// CIR: cir.func {{.*}} @test0(%[[ARG0:.*]]: !s32i {{.*}}) -> !u64i
// CIR: %[[EXPR_ADDR:.*]] = cir.alloca "expr" {{.*}} init : !cir.ptr<!s32i>
// CIR: cir.store %[[ARG0]], %[[EXPR_ADDR]]
diff --git a/clang/test/CIR/CodeGenCUDA/kernel-call.cu b/clang/test/CIR/CodeGenCUDA/kernel-call.cu
index 5a0be6b536cb2..333af22473a02 100644
--- a/clang/test/CIR/CodeGenCUDA/kernel-call.cu
+++ b/clang/test/CIR/CodeGenCUDA/kernel-call.cu
@@ -62,7 +62,6 @@
//
// Check cudaLaunchKernel is called with all 6 arguments:
// func ptr, gridDim, blockDim, args, sharedMem, stream
-// dim3 is 12 bytes, so each one is passed as an INTEGER eightbyte pair.
// CUDA-NEW: cir.call @cudaLaunchKernel({{.*}}) : (!cir.ptr<!void>{{.*}}, !u64i, !u32i, !u64i, !u32i, !cir.ptr<!cir.ptr<!void>>{{.*}}, !u64i{{.*}}, !cir.ptr<!rec_cudaStream>{{.*}}) -> (!u32i {llvm.noundef})
// CUDA-PTH: cir.call @cudaLaunchKernel_ptsz
>From f117fbbda894409bc292c38fe7aa6f118e2bc75f Mon Sep 17 00:00:00 2001
From: Adam Smith <adams at nvidia.com>
Date: Mon, 10 Aug 2026 16:22:02 -0700
Subject: [PATCH 4/5] [CIR] Let the lambda OGCG checks tolerate an added
parameter attribute
The two `capture_one` and `capture_mixed` OGCG lines pinned the indirect
parameter as `ptr noundef align 4`, which classic CodeGen no longer emits
verbatim: an attribute now sits between `ptr` and `noundef`, which is what
`cbe3031ee342` accommodated for `capture_two` in the same file.
Widening the gap to `ptr{{.*}} noundef` matches with and without that
attribute, so the type token and the alignment stay pinned either way.
The wildcard carries no space before it on purpose, since requiring one
would fail wherever nothing separates the two tokens.
Assisted-by: Cursor / claude-opus-5
---
clang/test/CIR/CodeGen/lambda-dtor-field.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/test/CIR/CodeGen/lambda-dtor-field.cpp b/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
index 21ebf44a28221..30266f4560a0c 100644
--- a/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
+++ b/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
@@ -44,7 +44,7 @@ void capture_one(S s) {
// LLVM: call void @"_ZZ11capture_one1SEN3$_0D1Ev"(ptr {{.*}} %[[LAM1]])
// LLVM: ret void
-// OGCG-LABEL: define dso_local void @_Z11capture_one1S(ptr noundef align 4 %{{[^,)]+}})
+// OGCG-LABEL: define dso_local void @_Z11capture_one1S(ptr{{.*}} noundef align 4 %{{[^,)]+}})
// OGCG: %[[LAM1:.*]] = alloca %[[LAM_TY_1:.*]], align 4
// OGCG: %[[FIELD1:.*]] = getelementptr inbounds nuw %[[LAM_TY_1]], ptr %[[LAM1]], i32 0, i32 0
// OGCG: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[FIELD1]], ptr {{.*}} %s)
@@ -139,7 +139,7 @@ void capture_mixed(int n, S s) {
// LLVM: call void @"_ZZ13capture_mixedi1SEN3$_0D1Ev"(ptr {{.*}} %[[LAM3]])
// LLVM: ret void
-// OGCG-LABEL: define dso_local void @_Z13capture_mixedi1S(i32 noundef %{{[^,)]+}}, ptr noundef align 4 %{{[^,)]+}})
+// OGCG-LABEL: define dso_local void @_Z13capture_mixedi1S(i32 noundef %{{[^,)]+}}, ptr{{.*}} noundef align 4 %{{[^,)]+}})
// OGCG: %[[LAM3:.*]] = alloca %[[LAM_TY_3:.*]], align 4
// OGCG: %[[FN:.*]] = getelementptr inbounds nuw %[[LAM_TY_3]], ptr %[[LAM3]], i32 0, i32 0
// OGCG: %[[NVAL:.*]] = load i32, ptr %n.addr
>From 2d4dba7ae3e8f9c197505828ae6c692568a68d68 Mon Sep 17 00:00:00 2001
From: Adam Smith <adams at nvidia.com>
Date: Mon, 10 Aug 2026 16:54:58 -0700
Subject: [PATCH 5/5] [CIR] Stop pinning inferred parameter attributes in OGCG
checks
Three OGCG lines spelled out the whole parameter attribute run, as in
`ptr noundef align 4 %s` and `ptr noundef nonnull align 4
dereferenceable(12) %src`. Classic CodeGen infers that set, and it is not
fixed: it also emits `nofree` before `noundef` and `dereferenceable` after
the alignment, so the literal run stops matching whenever inference gains
an attribute.
Only the parts that describe the ABI stay pinned now, the type token, the
`sret` marker with its record type, and the alignment. The inferred
attributes sit behind wildcards. `capture_one` and `capture_mixed` are the
two that broke. `make_copy` had the same literal run and is fixed with
them rather than waiting for it to break too.
The attributes CIR lowering is responsible for are still checked, on the
LLVM arm rather than here.
Assisted-by: Cursor / claude-opus-5
---
clang/test/CIR/CodeGen/array-init-loop-exprs.cpp | 2 +-
clang/test/CIR/CodeGen/lambda-dtor-field.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/clang/test/CIR/CodeGen/array-init-loop-exprs.cpp b/clang/test/CIR/CodeGen/array-init-loop-exprs.cpp
index b1a9c54147a31..367ab64b36944 100644
--- a/clang/test/CIR/CodeGen/array-init-loop-exprs.cpp
+++ b/clang/test/CIR/CodeGen/array-init-loop-exprs.cpp
@@ -90,7 +90,7 @@ struct HasNonTrivialArray {
// LLVM-LABEL: define dso_local void @make_copy(ptr dead_on_unwind noalias writable sret(%struct.HasNonTrivialArray) align 4 %{{[^,)]+}}, ptr noundef nonnull align 4 dereferenceable(12) %{{[^,)]+}})
// LLVM: call void @_ZN18HasNonTrivialArrayC1ERKS_(
-// OGCG-LABEL: define dso_local void @make_copy(ptr dead_on_unwind noalias writable sret(%struct.HasNonTrivialArray) align 4 %{{[^,)]+}}, ptr noundef nonnull align 4 dereferenceable(12) %{{[^,)]+}})
+// OGCG-LABEL: define dso_local void @make_copy(ptr{{.*}} sret(%struct.HasNonTrivialArray) align 4 %{{[^,)]+}}, ptr{{.*}} align 4 {{.*}}%{{[^,)]+}})
// OGCG: call void @_ZN18HasNonTrivialArrayC1ERKS_(
//
// OGCG-LABEL: define {{.*}}@_ZN18HasNonTrivialArrayC1ERKS_(
diff --git a/clang/test/CIR/CodeGen/lambda-dtor-field.cpp b/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
index 30266f4560a0c..da21706fc1089 100644
--- a/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
+++ b/clang/test/CIR/CodeGen/lambda-dtor-field.cpp
@@ -44,7 +44,7 @@ void capture_one(S s) {
// LLVM: call void @"_ZZ11capture_one1SEN3$_0D1Ev"(ptr {{.*}} %[[LAM1]])
// LLVM: ret void
-// OGCG-LABEL: define dso_local void @_Z11capture_one1S(ptr{{.*}} noundef align 4 %{{[^,)]+}})
+// OGCG-LABEL: define dso_local void @_Z11capture_one1S(ptr{{.*}} align 4 {{.*}}%{{[^,)]+}})
// OGCG: %[[LAM1:.*]] = alloca %[[LAM_TY_1:.*]], align 4
// OGCG: %[[FIELD1:.*]] = getelementptr inbounds nuw %[[LAM_TY_1]], ptr %[[LAM1]], i32 0, i32 0
// OGCG: call void @_ZN1SC1ERKS_(ptr {{.*}} %[[FIELD1]], ptr {{.*}} %s)
@@ -139,7 +139,7 @@ void capture_mixed(int n, S s) {
// LLVM: call void @"_ZZ13capture_mixedi1SEN3$_0D1Ev"(ptr {{.*}} %[[LAM3]])
// LLVM: ret void
-// OGCG-LABEL: define dso_local void @_Z13capture_mixedi1S(i32 noundef %{{[^,)]+}}, ptr{{.*}} noundef align 4 %{{[^,)]+}})
+// OGCG-LABEL: define dso_local void @_Z13capture_mixedi1S(i32{{.*}} %{{[^,)]+}}, ptr{{.*}} align 4 {{.*}}%{{[^,)]+}})
// OGCG: %[[LAM3:.*]] = alloca %[[LAM_TY_3:.*]], align 4
// OGCG: %[[FN:.*]] = getelementptr inbounds nuw %[[LAM_TY_3]], ptr %[[LAM3]], i32 0, i32 0
// OGCG: %[[NVAL:.*]] = load i32, ptr %n.addr
More information about the cfe-commits
mailing list