Skip to content

Commit ec37e5c

Browse files
Build Automationigcbot
authored andcommitted
Merging LLVM compatibility patches
Supporting LLVM trunk revision 375d93465b3e6f342e0554cfaee308a45a523969
1 parent 16ee9ec commit ec37e5c

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*========================== begin_copyright_notice ============================
2+
3+
Copyright (C) 2025 Intel Corporation
4+
5+
SPDX-License-Identifier: MIT
6+
7+
============================= end_copyright_notice ===========================*/
8+
9+
/*========================== begin_copyright_notice ============================
10+
11+
Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
12+
See https://llvm.org/LICENSE.txt for license information.
13+
SPDX-License-Identifier: Apache-2.0 with LLVM-exception
14+
15+
============================= end_copyright_notice ===========================*/
16+
17+
This is a cherry-pick of commit https://github.com/llvm/llvm-project/commit/a87738f86b17f4a8dcde538c60826506e2a27ed1:
18+
19+
"[AutoUpgrade] Don't upgrade intrinsics returning overloaded struct type"
20+
21+
---
22+
23+
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
24+
index 7b9c55ff3..d0d5c9f4e 100644
25+
--- a/llvm/lib/IR/AutoUpgrade.cpp
26+
+++ b/llvm/lib/IR/AutoUpgrade.cpp
27+
@@ -1131,7 +1131,8 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
28+
}
29+
30+
auto *ST = dyn_cast<StructType>(F->getReturnType());
31+
- if (ST && (!ST->isLiteral() || ST->isPacked())) {
32+
+ if (ST && (!ST->isLiteral() || ST->isPacked()) &&
33+
+ F->getIntrinsicID() != Intrinsic::not_intrinsic) {
34+
// Replace return type with literal non-packed struct. Only do this for
35+
// intrinsics declared to return a struct, not for intrinsics with
36+
// overloaded return type, in which case the exact struct type will be
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*========================== begin_copyright_notice ============================
2+
3+
Copyright (C) 2025 Intel Corporation
4+
5+
SPDX-License-Identifier: MIT
6+
7+
============================= end_copyright_notice ===========================*/
8+
9+
/*========================== begin_copyright_notice ============================
10+
11+
Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
12+
See https://llvm.org/LICENSE.txt for license information.
13+
SPDX-License-Identifier: Apache-2.0 with LLVM-exception
14+
15+
============================= end_copyright_notice ===========================*/
16+
17+
This is a cherry-pick of commit https://github.com/llvm/llvm-project/commit/a87738f86b17f4a8dcde538c60826506e2a27ed1:
18+
19+
"[AutoUpgrade] Don't upgrade intrinsics returning overloaded struct type"
20+
21+
---
22+
23+
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
24+
index 7b9c55ff3..d0d5c9f4e 100644
25+
--- a/llvm/lib/IR/AutoUpgrade.cpp
26+
+++ b/llvm/lib/IR/AutoUpgrade.cpp
27+
@@ -1131,7 +1131,8 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
28+
}
29+
30+
auto *ST = dyn_cast<StructType>(F->getReturnType());
31+
- if (ST && (!ST->isLiteral() || ST->isPacked())) {
32+
+ if (ST && (!ST->isLiteral() || ST->isPacked()) &&
33+
+ F->getIntrinsicID() != Intrinsic::not_intrinsic) {
34+
// Replace return type with literal non-packed struct. Only do this for
35+
// intrinsics declared to return a struct, not for intrinsics with
36+
// overloaded return type, in which case the exact struct type will be

0 commit comments

Comments
 (0)