Commit Graph

113 Commits

Author SHA1 Message Date
Mateusz Guzik
04bab189b8 llvm/lld: damage control threading
See the comment inside.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D39389
2023-04-03 16:05:42 +00:00
Piotr Kubaj
a1ffc2fe9c llvm: make sure to use ELFv2 ABI on powerpc64
Currently LLVM is more or less set up to use ELFv2, but it still defaults to
ELFv1 in some places. This causes lld to generate broken binaries when used
with LTO.

PR:	269455
Approved by:	dim
MFC after:	3 days
2023-02-17 00:53:30 +01:00
Dimitry Andric
50d7464c3f Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:25 +01:00
Dimitry Andric
f3fd488f1e Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:19 +01:00
Dimitry Andric
6246ae0b85 Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:09 +01:00
Dimitry Andric
a4a491e223 Merge llvm-project release/15.x llvmorg-15.0.0-9-g1c73596d3454
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.0-9-g1c73596d3454.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:02 +01:00
Dimitry Andric
61cfbce334 Merge llvm-project release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.0-rc2-40-gfbd2950d8d0d.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:56 +01:00
Dimitry Andric
972a253a57 Merge llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17826-g1f8ae9d7e7e4, the last commit before
the upstream release/16.x branch was created.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:48 +01:00
Dimitry Andric
fcaf7f8644 Merge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17485-ga3e38b4a206b.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:04:38 +01:00
Dimitry Andric
753f127f3a Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:03:59 +01:00
Dimitry Andric
81ad626541 Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:02:26 +01:00
Dimitry Andric
4589169768 Apply llvm fix for crash building julia on PowerPC64
Merge commit 6710b21d4698 from llvm git (by Kai Luo):

  [PowerPC] Allow llvm.ppc.cfence to accept pointer types

  In the context of atomic load, integer, pointer and float point types are allowed, thus we should allow llvm.ppc.cfence to accept any type mentioned.

  Fixes https://github.com/llvm/llvm-project/issues/55983.

  Reviewed By: shchenz, vchuravy

  Differential Revision: https://reviews.llvm.org/D127554

Requested by:	jhibbits
MFC after:	3 days
2022-12-16 14:28:10 +01:00
Dimitry Andric
91ec809f0a Apply llvm fix for assertion/crash building math/vtk
Merge commit 307ace7f20d5 from llvm git (by David Sherwood):

  [LoopVectorize] Ensure the VPReductionRecipe is placed after all it's inputs

  When vectorising ordered reductions we call a function
  LoopVectorizationPlanner::adjustRecipesForReductions to replace the
  existing VPWidenRecipe for the fadd instruction with a new
  VPReductionRecipe. We attempt to insert the new recipe in the same
  place, but this is wrong because createBlockInMask may have
  generated new recipes that VPReductionRecipe now depends upon. I
  have changed the insertion code to append the recipe to the
  VPBasicBlock instead.

  Added a new RUN with tail-folding enabled to the existing test:

    Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll

  Differential Revision: https://reviews.llvm.org/D129550

Reported by:	yuri
PR:		264834
MFC after:	3 days
2022-09-27 23:45:56 +02:00
Dimitry Andric
9ef1127008 Apply tentative llvm fix for avoiding fma on PowerPC SPE
Merge llvm review D77558, by Justin Hibbits:

  PowerPC: Don't hoist float multiply + add to fused operation on SPE

  SPE doesn't have a fmadd instruction, so don't bother hoisting a
  multiply and add sequence to this, as it'd become just a library call.
  Hoisting happens too late for the CTR usability test to veto using the CTR
  in a loop, and results in an assert "Invalid PPC CTR loop!".

Reported by:		alfredo
Obtained from:		https://reviews.llvm.org/D77558
MFC after:		3 days
2022-07-09 15:17:26 +02:00
Dimitry Andric
836d47d38e Apply llvm fix for assertion/crash building archivers/c-blosc2
Merge commit 88ce403c6aab from llvm git (by Florian Hahn):

  [LV] Add new block to place recurrence splice, if needed.

  In some cases, a recurrence splice instructions needs to be inserted
  between to regions, for example if the regions get re-arranged during
  sinking.

  Fixes #56146.

PR:		264979
Reported by:	Robert Clausecker <fuz@fuz.su>
MFC after:	3 days
2022-07-02 01:13:46 +02:00
Dimitry Andric
56f451bb3b Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR:		261742
MFC after:	3 days
2022-06-12 20:53:16 +02:00
Dimitry Andric
2a66634d1b Merge llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.4-0-g29f1039a7285, aka 14.0.4 release.

PR:		261742
MFC after:	3 days
2022-06-04 15:18:46 +02:00
Dimitry Andric
592e876a42 Apply llvm fix for possible hangs with CPUTYPE=skylake-avx512
Merge commit e8305c0b8f49 from llvm git (by Simon Pilgrim)

    [X86] combineX86ShuffleChain - don't fold to truncate(concat(V1,V2)) if it was already a PACK op

    Fixes #55050

PR:		264394
Reported by:	VVD <vvd@unislabs.com>
MFC after:	3 days
2022-06-01 23:45:59 +02:00
Dimitry Andric
1a0329799c Apply llvm fix for "Invalid PPC CTR loop!" error on powerpcspe
Merge commit d9d15af7873f from llvm git (Qiu Chaofan):

  [PowerPC] Treat llvm.fmuladd intrinsic as using CTR

  This fixes bug 55463, similar to D78668. This is a temporary fix since
  we will switch to post-isel CTR loop determination in the future.

  Reviewed By: dim, shchenz

  Differential Revision: https://reviews.llvm.org/D125746

MFC after:	2 weeks
2022-05-18 20:29:02 +02:00
Dimitry Andric
3a9a9c0ca4 Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:42 +02:00
Dimitry Andric
fb03ea46eb Merge llvm-project release/14.x llvmorg-14.0.0-rc4-2-gadd3ab7f4c8a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc4-2-gadd3ab7f4c8a.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:23 +02:00
Dimitry Andric
d781ede639 Merge llvm-project release/14.x llvmorg-14.0.0-rc2-12-g09546e1b5103
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc2-12-g09546e1b5103.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:46:11 +02:00
Dimitry Andric
d56accc7c3 Merge llvm-project release/14.x llvmorg-14.0.0-rc1-74-g4dc3cb8e3255
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.0-rc1-74-g4dc3cb8e3255.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:45:57 +02:00
Dimitry Andric
8885dff6ce Apply fix for asm constraint error in www/php80-opcache
Merge commit 027c16bef4b7 from llvm git (by Nick Desaulniers):

  [X86ISelLowering] permit BlockAddressSDNode "i" constraints for PIC

  When building 32b x86 code as PIC, the existing handling of "i"
  constraints is conservative since generally we have to go through the
  GOT to find references to functions.

  But generally, BlockAddresses from C code refer to the Function in the
  current TU.  Permit BlockAddresses to be used with the "i" constraint
  for those cases.

  I regressed this in
  commit 4edb9983cb8c ("[SelectionDAG] treat X constrained labels as i for asm")

  Fixes: https://github.com/llvm/llvm-project/issues/53868

  Reviewed By: efriedma, MaskRay

  Differential Revision: https://reviews.llvm.org/D119905
2022-05-14 13:45:37 +02:00
Dimitry Andric
1838bd0f48 Merge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18315-g190be5457c90.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:45:25 +02:00
Dimitry Andric
1fd87a682a Merge llvm-project main llvmorg-14-init-18294-gdb01b123d012
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18294-gdb01b123d012, the last commit before
the upstream release/14.x branch was created.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:44:47 +02:00
Dimitry Andric
04eeddc0aa Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:44:34 +02:00
Dimitry Andric
0eae32dcef Merge llvm-project main llvmorg-14-init-13186-g0c553cc1af2e
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-13186-g0c553cc1af2e.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:44:01 +02:00
Dimitry Andric
4824e7fd18 Merge llvm-project main llvmorg-14-init-11187-g222442ec2d71
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-11187-g222442ec2d71.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:43:49 +02:00
Dimitry Andric
5e801ac66d Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:43:32 +02:00
Dimitry Andric
349cc55c97 Merge llvm-project main llvmorg-14-init-10186-gff7f2cfa959b
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10186-gff7f2cfa959b.

PR:		261742
MFC after:	2 weeks
2022-05-14 13:43:05 +02:00
Mateusz Guzik
30ed48b0a5 clang: Skip attempts to access /proc/self/fd
In contrast to Linux it does not provide entries which can be readlinked
-- these are just regular files, not giving the expected outcome. That's
on top of procfs not being mounted by default to begin with.

Reviewed by:	dim
Differential Revision:		https://reviews.freebsd.org/D34684
2022-03-27 18:01:38 +00:00
Dimitry Andric
8e72f458c6 Fix llvm build after 1b3bef43e3, due to API change
After merging llvm commit b9ca73e1a8fd for PR 262608, it would fail to
compile with:

/usr/src/contrib/llvm-project/llvm/lib/IR/Operator.cpp:197:22: error: no member named 'isZero' in 'llvm::APInt'
   if (!IndexedSize.isZero()) {
        ~~~~~~~~~~~ ^

Upstream refactored their APInt class, and isZero() was one of the newer
methods which did not yet exist in llvm 13.0.0. Fix this by using the
older but equivalent isNullValue() method instead.

Fixes:		1b3bef43e3
MFC after:	3 days
2022-03-20 00:12:58 +01:00
Dimitry Andric
1b3bef43e3 Apply llvm fix for assertion compiling certain versions of Wine
Merge commit b9ca73e1a8fd from llvm git (by Stephen Tozer):

  [DebugInfo] Correctly handle arrays with 0-width elements in GEP salvaging

  Fixes an issue where GEP salvaging did not properly account for GEP
  instructions which stepped over array elements of width 0 (effectively a
  no-op). This unnecessarily produced long expressions by appending
  `... + (x * 0)` and potentially extended the number of SSA values used
  in the dbg.value. This also erroneously triggered an assert in the
  salvage function that the element width would be strictly positive.
  These issues are resolved by simply ignoring these useless operands.

  Reviewed By: aprantl

  Differential Revision: https://reviews.llvm.org/D111809

PR:		262608
Reported by:	Damjan Jovanovic <damjan.jov@gmail.com>
MFC after:	3 days
2022-03-19 20:59:04 +01:00
Dimitry Andric
9738bc28ab Apply llvm fix for assertion failure compiling recent libc++
Merge commit c7c84b90879f from llvm git (by Adrian Prantl):

  [DwarfDebug] Refuse to emit DW_OP_LLVM_arg values wider than 64 bits

  DwarfExpression::addUnsignedConstant(const APInt &Value) only supports
  wider-than-64-bit values when it is used to emit a top-level DWARF
  expression representing the location of a variable. Before this change,
  it was possible to call addUnsignedConstant on >64 bit values within a
  subexpression when substituting DW_OP_LLVM_arg values.

  This can trigger an assertion failure (e.g. PR52584, PR52333) when it
  happens in a fragment (DW_OP_LLVM_fragment) expression, as
  addUnsignedConstant on >64 bit values splits the constant into separate
  DW_OP_pieces, which modifies DwarfExpression::OffsetInBits.

  This change papers over the assertion errors by bailing on overly wide
  DW_OP_LLVM_arg values. A more comprehensive fix might be to be to split
  wide values into pointer-sized fragments.

  [0] https://github.com/llvm/llvm-project/blob/e71fa03/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp#L799-L805

  Patch by Ricky Zhou!

  Differential Revision: https://reviews.llvm.org/D115343

MFC after:	3 days
2022-01-29 22:28:24 +01:00
Dimitry Andric
ada8b24d48 Apply clang fix for crash or assertion failure compiling part of llvm
Merge commit 77e8f4eeeeed from llvm git (by David Green):

  [ARM] Define ComplexPatternFuncMutatesDAG

  Some of the Arm complex pattern functions call canExtractShiftFromMul,
  which can modify the DAG in-place. For this to be valid and handled
  successfully we need to define ComplexPatternFuncMutatesDAG.

  Differential Revision: https://reviews.llvm.org/D107476

When building parts of llvm targeting armv6 on stable/12, the following
assertion can appear (or if assertions are disabled, clang is likely to
crash):

Assertion failed: (NodeToMatch->getOpcode() != ISD::DELETED_NODE && "NodeToMatch was removed partway through selection"), function SelectCodeCommon, file /usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp, line 3573.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /usr/obj/usr/src/freebsd12-amd64/tmp/usr/bin/c++ -cc1 -triple armv6kz-unknown-freebsd12.3-gnueabihf -S --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -mrelocation-model static -mconstructor-aliases -target-cpu arm1176jzf-s -target-feature +vfp2 -target-feature +vfp2sp -target-feature -vfp3 -target-feature -vfp3d16 -target-feature -vfp3d16sp -target-feature -vfp3sp -target-feature -fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature -vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature +fp64 -target-feature -d32 -target-feature -neon -target-feature -sha2 -target-feature -aes -target-feature -fp16fml -target-feature +strict-align -target-abi aapcs-linux -mfloat-abi hard -fallow-half-arguments-and-returns -ffunction-sections -fdata-sections -O1 -std=c++14 -fdeprecated-macro -fno-rtti -fno-signed-char -faddrsig -fexperimental-new-pass-manager PPCISelLowering-009095.ii
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'PPCISelLowering-009095.cpp'.
4.	Running pass 'ARM Instruction Selection' on function '@_ZN4llvm17PPCTargetLoweringC2ERKNS_16PPCTargetMachineERKNS_12PPCSubtargetE'

This crash or assertion is fixed by the upstream commit.

MFC after:	3 days
2021-12-24 12:46:00 +01:00
Dimitry Andric
5a925e4644 Apply fix for clang incorrectly optimizing part of dns/bind916
Merge commit e5a8af7a90c6 from llvm git (by Gulfem Savrun Yeniceri):

  [Passes] Fix relative lookup table converter pass

  This patch fixes the relative table converter pass for the lookup table
  accesses that are resulted in an instruction sequence, where gep is not
  immediately followed by a load, such as gep being hoisted outside the loop
  or another instruction is inserted in between them. The fix inserts the
  call to load.relative.instrinsic in the original place of load instead of gep.
  Issue is reported by FreeBSD via https://bugs.freebsd.org/259921.

  Differential Revision: https://reviews.llvm.org/D115571

PR:		259921
Reported by:	O. Hartmann <freebsd@walstatt-de.de>
MFC after:	3 days
2021-12-15 22:27:39 +01:00
Dimitry Andric
397a8ba053 Apply fix for LLVM PR51957 (Miscompilation in Botan's SHA3)
Merge commit e27a6db5298f from llvm git (by Jameson Nash):

  Bad SLPVectorization shufflevector replacement, resulting in write to wrong memory location

  We see that it might otherwise do:

    %10 = getelementptr {}**, <2 x {}***> %9, <2 x i32> <i32 10, i32 4>
    %11 = bitcast <2 x {}***> %10 to <2 x i64*>
  ...
    %27 = extractelement <2 x i64*> %11, i32 0
    %28 = bitcast i64* %27 to <2 x i64>*
    store <2 x i64> %22, <2 x i64>* %28, align 4, !tbaa !2

  Which is an out-of-bounds store (the extractelement got offset 10
  instead of offset 4 as intended). With the fix, we correctly generate
  extractelement for i32 1 and generate correct code.

  Differential Revision: https://reviews.llvm.org/D106613
2021-11-13 21:52:25 +01:00
Dimitry Andric
a18c6161ef Fix assertion when building devel/glog with new pass manager
Merge commit 029f1a534489 from llvm git (by Arthur Eubanks):

  [LazyCallGraph] Skip blockaddresses

  blockaddresses do not participate in the call graph since the only
  instructions that use them must all return to someplace within the
  current function. And passes cannot retrieve a function address from a
  blockaddress.

  This was suggested by efriedma in D58260.

  Fixes PR50881.

  Reviewed By: nickdesaulniers

  Differential Revision: https://reviews.llvm.org/D112178
2021-11-13 21:52:24 +01:00
Dimitry Andric
4e117af10c Fix "Bad machine code" when building world for mips or mips64
Merge commit f5755c0849a5 from llvm git (by Jessica Clarke):

  [Mips] Add glue between CopyFromReg, CopyToReg and RDHWR nodes for TLS

  The MIPS ABI requires the thread pointer be accessed via rdhwr $3, $r29.
  This is currently represented by (CopyToReg $3, (RDHWR $29)) followed by
  a (CopyFromReg $3). However, there is no glue between these, meaning
  scheduling can break those apart. In particular, PR51691 is a report
  where PseudoSELECT_I was moved to between the CopyToReg and CopyFromReg,
  and since its expansion uses branches, it split the def and use of the
  physical register between two basic blocks, resulting in the def being
  eliminated and the use having no def. It also seems possible that a
  similar situation could arise splitting up the CopyToReg from the RDHWR,
  causing the RDHWR to use a destination register other than $3, violating
  the ABI requirement.

  Thus, add glue between all three nodes to ensure they aren't split up
  during instruction selection. No regression test is added since any test
  would be implictly relying on specific scheduling behaviour, so whilst
  it might be testing that glue is preventing reordering today, changes to
  scheduling behaviour could result in the test no longer being able to
  catch a regression here, as the reordering might no longer happen for
  other unrelated reasons.

  Fixes PR51691.

  Reviewed By: atanasyan, dim

  Differential Revision: https://reviews.llvm.org/D111967
2021-11-13 21:52:24 +01:00
Dimitry Andric
28a41182c0 Merge llvm-project 13.0.0 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-0-gd7b669b3a303, aka 13.0.0 release.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:49:29 +01:00
Dimitry Andric
8c6f6c0c80 Merge llvm-project release/13.x llvmorg-13.0.0-rc3-8-g08642a395f23
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc3-8-g08642a395f23.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:46:08 +01:00
Dimitry Andric
69ade1e033 Merge llvm-project release/13.x llvmorg-13.0.0-rc2-43-gf56129fe78d5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc2-43-gf56129fe78d5.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:45:49 +01:00
Dimitry Andric
6e75b2fbf9 Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc1-97-g23ba3732246a.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:42:03 +01:00
Dimitry Andric
fe6060f10f Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:39:49 +01:00
Dimitry Andric
4b9725184e Fix clang's internal assembler adding unwanted prefix to VIA xstore
Merge commit 2d8c18fbbdd1 from llvm git (by Jessica Clarke):

  [X86] Don't add implicit REP prefix to VIA PadLock xstore

  Commit 8fa3e8fa1492 added an implicit REP prefix to all VIA PadLock
  instructions, but GNU as doesn't add one to xstore, only all the others.
  This resulted in a kernel panic regression in FreeBSD upon updating to
  LLVM 11 (https://bugs.freebsd.org/259218) which includes the commit in
  question. This partially reverts that commit.

  Reviewed By: craig.topper

  Differential Revision: https://reviews.llvm.org/D112355

MFC after:	3 days
2021-10-23 20:20:00 +02:00
Alfredo Dal'Ava Junior
f21fcae487 llvm: Revert "[HardwareLoops] Change order of SCEV expression construction for InitLoopCount."
Reverts llvm commit 42eaf4fe0adef3344adfd9fbccd49f325cb549ef, pointed
from bisect as source of regression that causes liblzma to compress/
uncompress incorrectly. It's know to affect powerpc64 BE only.

The patch unbreaks FreeBSD powerpc64 installation media, since
bsdinstall can't uncompress the *.txz produced by FreeBSD CI. It's
probably miscompiling other software bas well.

Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=51714

Reviewed by:	dim
MFC after:	2 days
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D31804
2021-09-03 13:31:54 -03:00
Alfredo Dal'Ava Junior
9a4d48a645 llvm/powerpc64*: fix broken binaries generated by clang12
Amends LLVM commit 2518433f861fcb877d0a7bdd9aec1aec1f77505a that
was pointed as the source of regression on LLVM12.

This affects powerpc64*, making binaries crash with segmentation fault
due to bad code generation around "__stack_chk_guard"

Root cause and/or proper fix is under investigation by:
    https://bugs.llvm.org/show_bug.cgi?id=51590

Reviewed by:    dim
MFC after:      2 days
Sponsored by:   Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:  https://reviews.freebsd.org/D31698
2021-08-27 11:47:11 -03:00
Dimitry Andric
4652422eb4 Merge llvm-project 12.0.1 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-0-gfed41342a82f, a.k.a. 12.0.1 release.

PR:		255570
MFC after:	6 weeks
2021-07-16 18:29:42 +02:00
Dimitry Andric
014a40f8f6 Disable llvm generating 128-bit multiply libcalls on 32-bit ARM
Merge commit 789708617d20 from llvm git (Koutheir Attouchi):

  Do not generate calls to the 128-bit function __multi3() on 32-bit ARM

  Re-applying this patch after bots failures. Should be fine now.

  The function __multi3() is undefined on 32-bit ARM, so a call to it should
  never be emitted. Instead, plain instructions need to be generated to
  perform 128-bit multiplications.

  Differential Revision: https://reviews.llvm.org/D103906

Reported by:	mmel
MFC after:	3 days
2021-06-22 22:26:13 +02:00