arichardson wrote:
CI looks unhappy, mlir also seems to need updates:
MLIR :: Target/LLVMIR/llvmir.mlir
MLIR :: mlir-cpu-runner/x86-varargs.mlir
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
github-actions[bot] wrote:
:white_check_mark: With the latest revision this PR passed the C/C++ code
formatter.
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
github-actions[bot] wrote:
:white_check_mark: With the latest revision this PR passed the Python code
formatter.
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -1318,16 +1318,16 @@ define void @instructions.va_arg(i8* %v, ...) {
%ap2 = bitcast i8** %ap to i8*
call void @llvm.va_start(i8* %ap2)
- ; CHECK: call void @llvm.va_start(ptr %ap2)
+ ; CHECK: call void @llvm.va_start.p0(ptr %ap2)
va_arg i8* %ap2, i32
; CHECK:
@@ -1318,16 +1318,16 @@ define void @instructions.va_arg(i8* %v, ...) {
%ap2 = bitcast i8** %ap to i8*
call void @llvm.va_start(i8* %ap2)
- ; CHECK: call void @llvm.va_start(ptr %ap2)
+ ; CHECK: call void @llvm.va_start.p0(ptr %ap2)
va_arg i8* %ap2, i32
; CHECK:
https://github.com/jrtc27 approved this pull request.
LGTM once typo is fixed
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jrtc27 edited https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/arichardson approved this pull request.
LGTM thanks! Please wait for @jrtc27 to also approve before committing though.
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/arsenm approved this pull request.
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jrtc27 wrote:
This probably also needs to tweak LangRef
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -792,13 +792,14 @@ EncompassingIntegerType(ArrayRef Types) {
Value *CodeGenFunction::EmitVAStartEnd(Value *ArgValue, bool IsStart) {
Intrinsic::ID inst = IsStart ? Intrinsic::vastart : Intrinsic::vaend;
- return Builder.CreateCall(CGM.getIntrinsic(inst), ArgValue);
+
@@ -700,10 +700,13 @@ class MSBuiltin {
//===--- Variable Argument Handling Intrinsics
===//
//
-def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [],
"llvm.va_start">;
-def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty,
@@ -700,10 +700,13 @@ class MSBuiltin {
//===--- Variable Argument Handling Intrinsics
===//
//
-def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [],
"llvm.va_start">;
-def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty,
@@ -700,10 +700,13 @@ class MSBuiltin {
//===--- Variable Argument Handling Intrinsics
===//
//
-def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [],
"llvm.va_start">;
-def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty,
@@ -700,10 +700,13 @@ class MSBuiltin {
//===--- Variable Argument Handling Intrinsics
===//
//
-def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [],
"llvm.va_start">;
-def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty,
@@ -700,10 +700,13 @@ class MSBuiltin {
//===--- Variable Argument Handling Intrinsics
===//
//
-def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [],
"llvm.va_start">;
-def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty,
@@ -700,10 +700,13 @@ class MSBuiltin {
//===--- Variable Argument Handling Intrinsics
===//
//
-def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [],
"llvm.va_start">;
-def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty,
@@ -1713,7 +1716,7 @@ def int_coro_subfn_addr : DefaultAttrsIntrinsic<
///===-- Other Intrinsics
--===//
//
-// TODO: We should introduce a new memory kind fo traps (and other side
effects
+// TODO: We should introduce a new
@@ -0,0 +1,22 @@
+// REQUIRES: spirv-registered-target
AlexVlx wrote:
I was not certain and erred on the side of caution. You are correct (as far as
I can tell), and have removed the requirement. Thank you for pointing it out!
@@ -0,0 +1,22 @@
+// REQUIRES: spirv-registered-target
+// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fcuda-is-device -emit-llvm
-o - %s | FileCheck %s
+struct x {
+ double b;
+ long a;
+};
+
+void testva(int n, ...) {
+ __builtin_va_list ap;
+ __builtin_va_start(ap,
@@ -0,0 +1,22 @@
+// REQUIRES: spirv-registered-target
+// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fcuda-is-device -emit-llvm
-o - %s | FileCheck %s
+struct x {
AlexVlx wrote:
Done.
https://github.com/llvm/llvm-project/pull/85460
yxsamliu wrote:
> Doesn’t AutoUpgrade automatically infer overloads? You can see a bunch of
> tests in this patch where the output references the overloaded intrinsics but
> the input is unchanged.
OK it seems to be handled already and test covered. Thanks.
jrtc27 wrote:
Doesn’t AutoUpgrade automatically infer overloads? You can see a bunch of tests
in this patch where the output references the overloaded intrinsics but the
input is unchanged.
https://github.com/llvm/llvm-project/pull/85460
___
yxsamliu wrote:
Is LLVM IR using the old vaarg intrinsics still consumable?
Should we update AutoUpgrade.cpp to auto upgrade the old vaarg intrinsics and
add a test for them?
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing
https://github.com/arichardson commented:
Thanks, this looks great once all of @jrtc27's comments have been addressed.
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -0,0 +1,22 @@
+// REQUIRES: spirv-registered-target
+// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fcuda-is-device -emit-llvm
-o - %s | FileCheck %s
+struct x {
jrtc27 wrote:
Newline before
https://github.com/llvm/llvm-project/pull/85460
@@ -1713,7 +1716,7 @@ def int_coro_subfn_addr : DefaultAttrsIntrinsic<
///===-- Other Intrinsics
--===//
//
-// TODO: We should introduce a new memory kind fo traps (and other side
effects
+// TODO: We should introduce a new
@@ -0,0 +1,22 @@
+// REQUIRES: spirv-registered-target
+// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fcuda-is-device -emit-llvm
-o - %s | FileCheck %s
+struct x {
+ double b;
+ long a;
+};
+
+void testva(int n, ...) {
+ __builtin_va_list ap;
+ __builtin_va_start(ap,
@@ -0,0 +1,22 @@
+// REQUIRES: spirv-registered-target
+// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fcuda-is-device -emit-llvm
-o - %s | FileCheck %s
+struct x {
+ double b;
+ long a;
+};
+
+void testva(int n, ...) {
+ __builtin_va_list ap;
+ __builtin_va_start(ap,
https://github.com/jrtc27 commented:
Some minor comments, but otherwise would be good to see this upstream. We've
had this downstream in CHERI LLVM for many years and never got round to
upstreaming it.
https://github.com/llvm/llvm-project/pull/85460
@@ -0,0 +1,22 @@
+// REQUIRES: spirv-registered-target
jrtc27 wrote:
Does it actually? Normally -emit-llvm works regardless of the enabled backends
https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits
https://github.com/jrtc27 edited https://github.com/llvm/llvm-project/pull/85460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-backend-webassembly
Author: Alex Voicu (AlexVlx)
Changes
Currently, the builtins used for implementing `va_list` handling
unconditionally take their arguments as unqualified `ptr`s i.e. pointers to AS
0. This does not work for targets where the
33 matches
Mail list logo