Skip to content

Commit e5edfda

Browse files
SC llvm teamSC llvm team
SC llvm team
authored and
SC llvm team
committed
Merged main:65b7cbbd8735b90933369364153b982d498f649a into amd-gfx:2f9a9b483f9f
Local branch amd-gfx 2f9a9b4 Merged main:be5ecc35efc902a4742669d41a88cfd88babb245 into amd-gfx:fee3baa081ca Remote branch main 65b7cbb [lit] Export env vars in script to avoid pruning (llvm#105759)
2 parents 2f9a9b4 + 65b7cbb commit e5edfda

File tree

6 files changed

+41
-5
lines changed

6 files changed

+41
-5
lines changed

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 509532
19+
#define LLVM_MAIN_REVISION 509536
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,7 +2140,7 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
21402140
return GetConstantFoldFPValue128(Result, Ty);
21412141
}
21422142
LibFunc Fp128Func = NotLibFunc;
2143-
if (TLI->getLibFunc(Name, Fp128Func) && TLI->has(Fp128Func) &&
2143+
if (TLI && TLI->getLibFunc(Name, Fp128Func) && TLI->has(Fp128Func) &&
21442144
Fp128Func == LibFunc_logl)
21452145
return ConstantFoldFP128(logf128, Op->getValueAPF(), Ty);
21462146
}

llvm/lib/Analysis/LazyValueInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ class LazyValueInfoImpl {
512512
} // namespace llvm
513513

514514
void LazyValueInfoImpl::solve() {
515-
SmallVector<std::pair<BasicBlock *, Value *>, 8> StartingStack(
516-
BlockValueStack.begin(), BlockValueStack.end());
515+
SmallVector<std::pair<BasicBlock *, Value *>, 8> StartingStack =
516+
BlockValueStack;
517517

518518
unsigned processedCount = 0;
519519
while (!BlockValueStack.empty()) {

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7239,11 +7239,12 @@ InstructionCost LoopVectorizationPlanner::cost(VPlan &Plan,
72397239
return Cost;
72407240
}
72417241

7242+
#ifndef NDEBUG
72427243
/// Return true if the original loop \ TheLoop contains any instructions that do
72437244
/// not have corresponding recipes in \p Plan and are not marked to be ignored
72447245
/// in \p CostCtx. This means the VPlan contains simplification that the legacy
72457246
/// cost-model did not account for.
7246-
[[maybe_unused]] static bool
7247+
static bool
72477248
planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
72487249
VPCostContext &CostCtx, Loop *TheLoop,
72497250
LoopVectorizationCostModel &CM) {
@@ -7288,6 +7289,7 @@ planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
72887289
});
72897290
});
72907291
}
7292+
#endif
72917293

72927294
VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
72937295
if (VPlans.empty())
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2+
; RUN: opt < %s -passes=inline -S | FileCheck %s
3+
4+
define void @fli() {
5+
; CHECK-LABEL: define void @fli() {
6+
; CHECK-NEXT: [[ENTRY:.*:]]
7+
; CHECK-NEXT: [[TMP0:%.*]] = call fp128 @llvm.floor.f128(fp128 0xL999999999999999A4001199999999999)
8+
; CHECK-NEXT: ret void
9+
;
10+
entry:
11+
call void @sc()
12+
ret void
13+
}
14+
15+
define void @sc() {
16+
; CHECK-LABEL: define void @sc() {
17+
; CHECK-NEXT: [[ENTRY:.*:]]
18+
; CHECK-NEXT: [[TMP0:%.*]] = tail call fp128 @llvm.floor.f128(fp128 0xL999999999999999A4001199999999999)
19+
; CHECK-NEXT: ret void
20+
;
21+
entry:
22+
%0 = tail call fp128 @llvm.floor.f128(fp128 0xL999999999999999A4001199999999999)
23+
ret void
24+
}

llvm/utils/lit/lit/TestRunner.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,16 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
12261226
commands[i] += f" && {{ {command}; }}"
12271227
if test.config.pipefail:
12281228
f.write(b"set -o pipefail;" if mode == "wb" else "set -o pipefail;")
1229+
1230+
# Manually export any DYLD_* variables used by dyld on macOS because
1231+
# otherwise they are lost when the shell executable is run, before the
1232+
# lit test is executed.
1233+
env_str = "\n".join(
1234+
"export {}={};".format(k, shlex.quote(v))
1235+
for k, v in test.config.environment.items()
1236+
if k.startswith("DYLD_")
1237+
)
1238+
f.write(bytes(env_str, "utf-8") if mode == "wb" else env_str)
12291239
f.write(b"set -x;" if mode == "wb" else "set -x;")
12301240
if sys.version_info > (3, 0) and mode == "wb":
12311241
f.write(bytes("{ " + "; } &&\n{ ".join(commands) + "; }", "utf-8"))

0 commit comments

Comments
 (0)