Skip to content

Commit

Permalink
Merged main:65b7cbbd8735b90933369364153b982d498f649a into amd-gfx:2f9…
Browse files Browse the repository at this point in the history
…a9b483f9f

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)
  • Loading branch information
SC llvm team authored and SC llvm team committed Aug 24, 2024
2 parents 2f9a9b4 + 65b7cbb commit e5edfda
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 5 deletions.
2 changes: 1 addition & 1 deletion llvm/include/llvm/Config/llvm-config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

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

/* Define if LLVM_ENABLE_DUMP is enabled */
#cmakedefine LLVM_ENABLE_DUMP
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Analysis/ConstantFolding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2140,7 +2140,7 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
return GetConstantFoldFPValue128(Result, Ty);
}
LibFunc Fp128Func = NotLibFunc;
if (TLI->getLibFunc(Name, Fp128Func) && TLI->has(Fp128Func) &&
if (TLI && TLI->getLibFunc(Name, Fp128Func) && TLI->has(Fp128Func) &&
Fp128Func == LibFunc_logl)
return ConstantFoldFP128(logf128, Op->getValueAPF(), Ty);
}
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Analysis/LazyValueInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ class LazyValueInfoImpl {
} // namespace llvm

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

unsigned processedCount = 0;
while (!BlockValueStack.empty()) {
Expand Down
4 changes: 3 additions & 1 deletion llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7239,11 +7239,12 @@ InstructionCost LoopVectorizationPlanner::cost(VPlan &Plan,
return Cost;
}

#ifndef NDEBUG
/// Return true if the original loop \ TheLoop contains any instructions that do
/// not have corresponding recipes in \p Plan and are not marked to be ignored
/// in \p CostCtx. This means the VPlan contains simplification that the legacy
/// cost-model did not account for.
[[maybe_unused]] static bool
static bool
planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
VPCostContext &CostCtx, Loop *TheLoop,
LoopVectorizationCostModel &CM) {
Expand Down Expand Up @@ -7288,6 +7289,7 @@ planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
});
});
}
#endif

VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
if (VPlans.empty())
Expand Down
24 changes: 24 additions & 0 deletions llvm/test/Transforms/Inline/simplify-fp128.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -passes=inline -S | FileCheck %s

define void @fli() {
; CHECK-LABEL: define void @fli() {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: [[TMP0:%.*]] = call fp128 @llvm.floor.f128(fp128 0xL999999999999999A4001199999999999)
; CHECK-NEXT: ret void
;
entry:
call void @sc()
ret void
}

define void @sc() {
; CHECK-LABEL: define void @sc() {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: [[TMP0:%.*]] = tail call fp128 @llvm.floor.f128(fp128 0xL999999999999999A4001199999999999)
; CHECK-NEXT: ret void
;
entry:
%0 = tail call fp128 @llvm.floor.f128(fp128 0xL999999999999999A4001199999999999)
ret void
}
10 changes: 10 additions & 0 deletions llvm/utils/lit/lit/TestRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,16 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
commands[i] += f" && {{ {command}; }}"
if test.config.pipefail:
f.write(b"set -o pipefail;" if mode == "wb" else "set -o pipefail;")

# Manually export any DYLD_* variables used by dyld on macOS because
# otherwise they are lost when the shell executable is run, before the
# lit test is executed.
env_str = "\n".join(
"export {}={};".format(k, shlex.quote(v))
for k, v in test.config.environment.items()
if k.startswith("DYLD_")
)
f.write(bytes(env_str, "utf-8") if mode == "wb" else env_str)
f.write(b"set -x;" if mode == "wb" else "set -x;")
if sys.version_info > (3, 0) and mode == "wb":
f.write(bytes("{ " + "; } &&\n{ ".join(commands) + "; }", "utf-8"))
Expand Down

0 comments on commit e5edfda

Please sign in to comment.