diff --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake index e3e35e1b6e35a4..1c300cd7340b63 100644 --- a/llvm/include/llvm/Config/llvm-config.h.cmake +++ b/llvm/include/llvm/Config/llvm-config.h.cmake @@ -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 diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 81c4d4ec5be412..26d9304cb73672 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -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); } diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index 47d3dac73083ee..615d8b7ccd8ccf 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/lib/Analysis/LazyValueInfo.cpp @@ -512,8 +512,8 @@ class LazyValueInfoImpl { } // namespace llvm void LazyValueInfoImpl::solve() { - SmallVector, 8> StartingStack( - BlockValueStack.begin(), BlockValueStack.end()); + SmallVector, 8> StartingStack = + BlockValueStack; unsigned processedCount = 0; while (!BlockValueStack.empty()) { diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index b12121d4688c65..6fd89ef76f9aae 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -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) { @@ -7288,6 +7289,7 @@ planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF, }); }); } +#endif VectorizationFactor LoopVectorizationPlanner::computeBestVF() { if (VPlans.empty()) diff --git a/llvm/test/Transforms/Inline/simplify-fp128.ll b/llvm/test/Transforms/Inline/simplify-fp128.ll new file mode 100644 index 00000000000000..73e63702cefcba --- /dev/null +++ b/llvm/test/Transforms/Inline/simplify-fp128.ll @@ -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 +} diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py index 2d9af9fbbb3634..4dad1412436d93 100644 --- a/llvm/utils/lit/lit/TestRunner.py +++ b/llvm/utils/lit/lit/TestRunner.py @@ -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"))