platform/upstream/llvm.git
23 months ago[flang] Set attribute at the correct position
Valentin Clement [Thu, 18 Aug 2022 18:21:21 +0000 (20:21 +0200)]
[flang] Set attribute at the correct position

The TargetRewrite pass can change the number of argument of a function.
An extra llvm.nest attribute is added and was not set at the correct position
if an extra argument was inserted before.

Reviewed By: PeteSteinfeld

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

23 months ago[LV] Support fixed order recurrences.
Florian Hahn [Thu, 18 Aug 2022 18:15:51 +0000 (19:15 +0100)]
[LV] Support fixed order recurrences.

If the incoming previous value of a fixed-order recurrence is a phi in
the header, go through incoming values from the latch until we find a
non-phi value. Use this as the new Previous, all uses in the header
will be dominated by the original phi, but need to be moved after
the non-phi previous value.

At the moment, fixed-order recurrences are modeled as a chain of
first-order recurrences.

Reviewed By: Ayal

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

23 months ago[LV-L] Add const and move method body out of line [nfc]
Philip Reames [Thu, 18 Aug 2022 18:10:11 +0000 (11:10 -0700)]
[LV-L] Add const and move method body out of line [nfc]

23 months ago[libc++] Replace _LIBCPP_INLINE_VISIBILITY and mark all functions _LIBCPP_HIDE_FROM_A...
Nikolas Klauser [Wed, 17 Aug 2022 14:35:57 +0000 (16:35 +0200)]
[libc++] Replace _LIBCPP_INLINE_VISIBILITY and mark all functions _LIBCPP_HIDE_FROM_ABI in __split_buffer

Reviewed By: ldionne, huixie90, #libc

Spies: libcxx-commits

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

23 months ago[LV] Use early continue to simplify code [nfc]
Philip Reames [Thu, 18 Aug 2022 17:31:43 +0000 (10:31 -0700)]
[LV] Use early continue to simplify code [nfc]

23 months ago[test][mlir] Disable tests with HWASAN
Vitaly Buka [Thu, 18 Aug 2022 17:15:41 +0000 (10:15 -0700)]
[test][mlir] Disable tests with HWASAN

Re-enable after fixing https://github.com/llvm/llvm-project/issues/57231

23 months ago[test] Disable DynamicLibrary with HWASAN
Vitaly Buka [Thu, 18 Aug 2022 16:59:46 +0000 (09:59 -0700)]
[test] Disable DynamicLibrary with HWASAN

Re-enabled when https://github.com/llvm/llvm-project/issues/57206 fixed.

23 months ago[NFC][libc] Detect HWASAN support macro
Vitaly Buka [Thu, 18 Aug 2022 16:57:56 +0000 (09:57 -0700)]
[NFC][libc] Detect HWASAN support macro

23 months ago[flang][test] Fix semantics tests with respect to warnings
Emil Kieri [Wed, 17 Aug 2022 17:56:03 +0000 (19:56 +0200)]
[flang][test] Fix semantics tests with respect to warnings

Make tests expect the (correctly) emitted warnings using the WARNING
directive. This directive is non-functional now, but will be recognised
by test_errors.py when D125804 is landed. This patch is a preparation
for D125804.

For most tests, we add missing WARNING directives for emitted warnings,
but there are exceptions:

 - for int-literals.f90 and resolve31.f90 we pass -pedantic to the
   frontend driver, so that the expected warnings are actually emitted.

 - for block-data01.f90 and resolve42.f90 we change the tests so that
   warnings, which appear unintentional, are not emitted. While testing
   the warning in question (padding added for alignment in common block)
   would be desired, that is beyond the scope of this patch. This
   warning is target-dependent.

Reviewed By: PeteSteinfeld

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

23 months ago[mlir][LLVMIR] Fix syntax in integration tests (NFC)
Jeff Niu [Thu, 18 Aug 2022 17:09:12 +0000 (13:09 -0400)]
[mlir][LLVMIR] Fix syntax in integration tests (NFC)

23 months ago[SVE] Extend findMoreOptimalIndexType so BUILD_VECTORs do not force 64bit indices.
Paul Walker [Sun, 24 Jul 2022 12:30:56 +0000 (13:30 +0100)]
[SVE] Extend findMoreOptimalIndexType so BUILD_VECTORs do not force 64bit indices.

Extends findMoreOptimalIndexType to allow ISD::BUILD_VECTOR based
indices to be truncated when such truncation is lossless. This can
enable the use of 32bit gather/scatter indices thus making it less
likely to have to split a gather/scatter in two.

Depends on D125194

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

23 months ago[CostModel][X86] Add explicit int/fp arithmetic test coverage for avx512/slm/glm...
Simon Pilgrim [Thu, 18 Aug 2022 16:46:45 +0000 (17:46 +0100)]
[CostModel][X86] Add explicit int/fp arithmetic test coverage for avx512/slm/glm targets

23 months ago[mlir][LLVMIR] Change ShuffleVectorOp to use assembly format
Jeff Niu [Wed, 17 Aug 2022 16:22:20 +0000 (12:22 -0400)]
[mlir][LLVMIR] Change ShuffleVectorOp to use assembly format

This patch moves `LLVM::ShuffleVectorOp` to assembly format and in the
process drops the extra type that can be inferred (both operand types
are required to be the same) and switches to a dense integer array.

The syntax change:

```
// Before
%0 = llvm.shufflevector %0, %1 [0 : i32, 0 : i32, 0 : i32, 0 : i32] : vector<4xf32>, vector<4xf32>
// After
%0 = llvm.shufflevector %0, %1 [0, 0, 0, 0] : vector<4xf32>
```

Reviewed By: dcaballe

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

23 months ago[clangd] Fix a tsan failure in PreambleThrottle tests
Kadir Cetinkaya [Thu, 18 Aug 2022 16:34:21 +0000 (18:34 +0200)]
[clangd] Fix a tsan failure in PreambleThrottle tests

23 months agoUse a SmallPtrSet rather than a SmallVector in ClusterManager.
Jim Ingham [Tue, 16 Aug 2022 21:07:28 +0000 (14:07 -0700)]
Use a SmallPtrSet rather than a SmallVector in ClusterManager.

The m_objects store in this class is only used to check whether
this ClusterManager already owns this pointer.  With a SmallVector
the is_contained call was non-linear in number of children, and for
instance printing all the elements of a 16M element std::vector
didn't complete in the time I was willing to wait for it (hours).

Since we are only doing insert & contains, some kind of set is a
better data structure.  In this patch I used SmallPtrSet.  With
that, the same array prints out in 30 seconds.  I also tried a
std::unordered_set but that was slightly slower and used a fair bit
more memory.

Other than performance, this is NFC.

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

23 months agoRevert "[FindGRPC.cmake] Use `llvm_add_library()` for the custom proto target instead...
Argyrios Kyrtzidis [Thu, 18 Aug 2022 15:17:45 +0000 (08:17 -0700)]
Revert "[FindGRPC.cmake] Use `llvm_add_library()` for the custom proto target instead of `add_llvm_library()`"

Breaks configuring `clangd` with `-DCLANGD_ENABLE_REMOTE=On` (https://github.com/llvm/llvm-project/issues/57213)

This reverts commit ba688024077c3e51c6a0949246b2a1b76284e681.

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

23 months ago[CostModel][X86] Add explicit cmp/select test coverage for slm/glm targets
Simon Pilgrim [Thu, 18 Aug 2022 16:05:30 +0000 (17:05 +0100)]
[CostModel][X86] Add explicit cmp/select test coverage for slm/glm targets

23 months ago[CostModel][X86] Adjust SLM select costs to match poor throughput of pblendvb/blendvp...
Simon Pilgrim [Thu, 18 Aug 2022 15:53:17 +0000 (16:53 +0100)]
[CostModel][X86] Adjust SLM select costs to match poor throughput of pblendvb/blendvpd/blendvps

23 months ago[AMDGPU] Update comment on shrinking dpp. NFC
Joe Nash [Thu, 18 Aug 2022 14:58:54 +0000 (10:58 -0400)]
[AMDGPU] Update comment on shrinking dpp. NFC

23 months ago[flang] Enable SimplifyIntrinsics pass in driver.
Slava Zakharin [Wed, 17 Aug 2022 20:00:57 +0000 (13:00 -0700)]
[flang] Enable SimplifyIntrinsics pass in driver.

The pass is enabled for O1/O2/O3 optlevels now.

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

23 months ago[NFC][libc++] Fixes a typo.
Mark de Wever [Thu, 18 Aug 2022 15:27:43 +0000 (17:27 +0200)]
[NFC][libc++] Fixes a typo.

Discovered by phosek in D126971.

23 months ago[BOLT][AArch64] Ignore functions with islandsInfo during VeneerEliminarion and ICF
Denis Revunov [Fri, 29 Jul 2022 13:01:00 +0000 (09:01 -0400)]
[BOLT][AArch64] Ignore functions with islandsInfo during VeneerEliminarion and ICF

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

Reviewed By: yota9

23 months ago[InstCombine] Fix freeze instruction getting inserted before landingpad
Danila Malyutin [Thu, 18 Aug 2022 06:51:06 +0000 (09:51 +0300)]
[InstCombine] Fix freeze instruction getting inserted before landingpad

The code would use first non-phi instruction as an insertion point, however
this could lead to freeze getting inserted between phi and landingpad
causing a verifier assert.

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

23 months ago[Flang][OpenMP] Provide an error when the minus operator is used in a reduction
Kiran Chandramohan [Thu, 18 Aug 2022 14:34:45 +0000 (14:34 +0000)]
[Flang][OpenMP] Provide an error when the minus operator is used in a reduction

OpenMP 5.2 standard has deprecated the usage of the minus operation in
reductions. The minus operation also is an unpleasant feature with
varied interpretations.

The patch also changes the usage of the minus operator in some existing testcases.

Discussed in https://discourse.llvm.org/t/openmp-runtime-problem-with-subtraction-reduction/64404

Reviewed By: peixin

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

23 months ago[CostModel][X86] Add cost kinds test coverage for integer comparisons
Simon Pilgrim [Thu, 18 Aug 2022 14:25:27 +0000 (15:25 +0100)]
[CostModel][X86] Add cost kinds test coverage for integer comparisons

23 months ago[libc++][NFC] Add a short description for __split_buffer
Nikolas Klauser [Wed, 17 Aug 2022 15:01:02 +0000 (17:01 +0200)]
[libc++][NFC] Add a short description for __split_buffer

Reviewed By: Mordante, huixie90, #libc

Spies: libcxx-commits

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

23 months ago[LV] Restructure isPredicatedInst and isScalarWithPredication (w/a fix for uniform...
Philip Reames [Thu, 18 Aug 2022 14:08:39 +0000 (07:08 -0700)]
[LV] Restructure isPredicatedInst and isScalarWithPredication (w/a fix for uniform mem ops)

This change reorganizes the code and comments to make the expected semantics of these routines more clear. However, this is *not* an NFC change. The functional change is having isScalarWithPredication return false if the instruction does not need predicated. Specifically, for the case of a uniform memory operation we were previously considering it *not* to be a predicated instruction, but *were* considering it to be scalable with predication.

As can be seen with the test changes, this causes uniform memory ops which should have been lowered as uniform-per-parts values to instead be lowering via naive scalarization or if scalarization is infeasible (i.e. scalable vectors) aborted entirely. I also don't trust the code to bail out correctly 100% of the time, so it's possible we had a crash or miscompile from trying to scalarize something which isn't scalaralizable. I haven't found a concrete example here, but I am suspicious.

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

23 months ago[clangd] Use the "macro" semantic token for pre-defined identifiers
Christian Kandeler [Thu, 18 Aug 2022 14:12:50 +0000 (16:12 +0200)]
[clangd] Use the "macro" semantic token for pre-defined identifiers

This matches user expectations.

Reviewed By: sammccall

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

23 months ago[Flang] Mark 128 float MODULO intrinsic calls as "TODO"
Peter Steinfeld [Wed, 17 Aug 2022 23:54:34 +0000 (16:54 -0700)]
[Flang] Mark 128 float MODULO intrinsic calls as "TODO"

The code generated for this version of the intrinsic is broken.  I'm
marking it as a "TODO" for now so that people don't get unannounce bad
results.

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

23 months ago[CostModel][X86] getArithmeticInstrCost - use MUL/DIV/REM expansions for all cost...
Simon Pilgrim [Thu, 18 Aug 2022 13:18:54 +0000 (14:18 +0100)]
[CostModel][X86] getArithmeticInstrCost - use MUL/DIV/REM expansions for all cost kinds

The costs tables still assume throughput, but the general expansion patterns should be good for any cost kind

23 months ago[CostModel][X86] Add cost kinds test coverage for integer division/remainder operators
Simon Pilgrim [Thu, 18 Aug 2022 12:48:42 +0000 (13:48 +0100)]
[CostModel][X86] Add cost kinds test coverage for integer division/remainder operators

23 months ago[clang-tidy] Rename a local cmake variables to match the new tool name. NFC.
Martin Storsjö [Thu, 28 Jul 2022 10:54:43 +0000 (13:54 +0300)]
[clang-tidy] Rename a local cmake variables to match the new tool name. NFC.

This shouldn't have any externally visible effect.

This matches the new name from 18b4a8bcf3553174f770f09528c9bd01c8cebfe7.

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

23 months ago[CostModel] Replace getUserCost with getInstructionCost
Simon Pilgrim [Thu, 18 Aug 2022 10:55:23 +0000 (11:55 +0100)]
[CostModel] Replace getUserCost with getInstructionCost
* Replace getUserCost with getInstructionCost, covering all cost kinds.
* Remove getInstructionLatency, it's not implemented by any backends, and we should fold the functionality into getUserCost (now getInstructionCost) to make it easier for targets to handle the cost kinds with their existing cost callbacks.

Original Patch by @samparker (Sam Parker)

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

23 months ago[Clang] Propagate const context info when emitting compound literal
Ties Stuij [Thu, 18 Aug 2022 10:25:07 +0000 (11:25 +0100)]
[Clang] Propagate const context info when emitting compound literal

This patch fixes a crash when trying to emit a constant compound literal.

For C++ Clang evaluates either casts or binary operations at translation time,
but doesn't pass on the InConstantContext information that was inferred when
parsing the statement.  Because of this, strict FP evaluation (-ftrapping-math)
which shouldn't be in effect yet, then causes checkFloatingpointResult to return
false, which in tryEmitGlobalCompoundLiteral will trigger an assert that the
compound literal wasn't constant.

The discussion here around 'manifestly constant evaluated contexts' was very
helpful to me when trying to understand what LLVM's position is on what
evaluation context should be in effect, together with the explanatory text in
that patch itself:
https://reviews.llvm.org/D87528

Reviewed By: rjmccall, DavidSpickett

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

23 months agoPrecommit tests for D132115
wanglian [Thu, 18 Aug 2022 09:06:11 +0000 (17:06 +0800)]
Precommit tests for D132115

Reviewed By: david-arm

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

23 months ago[AMDGPU][MC][GFX11][NFC] Add missing tests for DS opcodes
Dmitry Preobrazhensky [Thu, 18 Aug 2022 09:50:29 +0000 (12:50 +0300)]
[AMDGPU][MC][GFX11][NFC] Add missing tests for DS opcodes

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

23 months ago[mlir][SCF] Loop lb/ub are symbols during Affine Min/Max canonicalization
Matthias Springer [Thu, 18 Aug 2022 09:43:20 +0000 (11:43 +0200)]
[mlir][SCF] Loop lb/ub are symbols during Affine Min/Max canonicalization

This fixes a bug in SCF/AffineCanonicalizationUtils.cpp. Loop lb/ub were previously considered dimensions, which caused a crash when a (non-optimizable) affine.min / affine.max expression was processed (due to multiplication of two dims). Lb/ub are now considered symbols and symbols may be multiplied. (The scope of the analysis is "within the loop body", at which point lb/ub are constants.)

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

23 months ago[Transforms] LICM.cpp - pull out repeated getUserCost call
Simon Pilgrim [Thu, 18 Aug 2022 09:43:21 +0000 (10:43 +0100)]
[Transforms] LICM.cpp - pull out repeated getUserCost call

Pulled out of D79483

23 months ago[Analysis] CostModel.cpp - merge isa<IntrinsicInst> and dyn_cast<IntrinsicInst> checks
Simon Pilgrim [Thu, 18 Aug 2022 09:41:15 +0000 (10:41 +0100)]
[Analysis] CostModel.cpp - merge isa<IntrinsicInst> and dyn_cast<IntrinsicInst> checks

Pulled out of D79483

23 months ago[AMDGPU][MC][GFX10][NFC] Split large test
Dmitry Preobrazhensky [Thu, 18 Aug 2022 09:37:27 +0000 (12:37 +0300)]
[AMDGPU][MC][GFX10][NFC] Split large test

Split gfx10_dasm_all.txt by encoding.

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

23 months ago[mlir][bufferize] Better error handling: Fail if ToMemrefOps are found
Matthias Springer [Thu, 18 Aug 2022 08:11:39 +0000 (10:11 +0200)]
[mlir][bufferize] Better error handling: Fail if ToMemrefOps are found

bufferization.to_memref ops are not supported in One-Shot Analysis. They often trigger a failed assertion that can be confusing. Instead, scan for to_memref ops before running the analysis and immediately abort with a proper error message.

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

23 months ago[NFC][AArch64] precommit sched model for tsv110
zhongyunde [Thu, 18 Aug 2022 09:31:19 +0000 (17:31 +0800)]
[NFC][AArch64] precommit sched model for tsv110

Part of the schedule model is not accurate, so need a initial test record the changes.
This assemble list is refer to the basic part of D128631

Reviewed By: dmgreen

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

23 months ago[MLIR][NFC] Sort table of operations alphabetically
Mats Petersson [Wed, 17 Aug 2022 17:55:48 +0000 (18:55 +0100)]
[MLIR][NFC] Sort table of operations alphabetically

Arrange the operations in alphabetical order, rather than what
appears to be the order they were added. This was suggested in
a review when adding new operations.

Reviewed By: rriddle

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

23 months ago[mlir][test] Require JIT support in JIT tests
Rainer Orth [Thu, 18 Aug 2022 09:26:07 +0000 (11:26 +0200)]
[mlir][test] Require JIT support in JIT tests

A number of mlir tests `FAIL` on Solaris/sparcv9 with `Target has no JIT
support`.  This patch fixes that by mimicing `clang/test/lit.cfg.py` which
implements a `host-supports-jit` keyword for this.  The gtest-based unit
tests don't support `REQUIRES:`, so lack of support needs to be hardcoded
there.

Tested on `amd64-pc-solaris2.11` (`check-mlir` results unchanged) and
`sparcv9-sun-solaris2.11` (only one unrelated failure left).

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

23 months ago[MLIR] Remove hardcoded usage of alloc/dealloc; use memory effects
Uday Bondhugula [Wed, 17 Aug 2022 04:23:54 +0000 (09:53 +0530)]
[MLIR] Remove hardcoded usage of alloc/dealloc; use memory effects

Remove hardcoded usage of memref.alloc/dealloc ops in affine utils; use memory
effects instead. This is NFC for existing test cases, but strictly more
general/powerful in terms of functionality: it allows other allocation and
freeing ops (like gpu.alloc/dealloc) to work in conjunction with affine ops and
utilities.

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

23 months ago[mlir][Vector] Support 0-D vectors in ReductionOp
Güray Özen [Mon, 15 Aug 2022 15:14:12 +0000 (15:14 +0000)]
[mlir][Vector] Support 0-D vectors in ReductionOp

This commit adds support for 0-D vectors in ReductionOp.

Reviewed By: nicolasvasilache, dcaballe

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

23 months ago[X86] Add schedule module for Alderlake-P
Haohai Wen [Thu, 18 Aug 2022 08:37:41 +0000 (16:37 +0800)]
[X86] Add schedule module for Alderlake-P

The X86SchedAlderlakeP.td file is automatically generated by schedtool
(D130897). Most of instruction's scheduling information is based on
measured ADL-P data in uops.info. Some data is from GLC tpt/lat data
provided by intel doc. The rest instruction's scheduling information is
from skylake client schedule model in order to get a relative complete
model.

Reviewed By: RKSimon

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

23 months agoDo not evaluate dependent immediate invocations
Utkarsh Saxena [Wed, 17 Aug 2022 14:44:41 +0000 (16:44 +0200)]
Do not evaluate dependent immediate invocations

We deferred the evaluation of dependent immediate invocations in https://reviews.llvm.org/D119375 until instantiation.
We should also not consider them referenced from a non-consteval context.

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

```
template<typename T>
class Bar {
  consteval static T x() { return 5; }
 public:
  Bar() : a(x()) {}

 private:
  int a;
};

Bar<int> g();
```
Is now accepted by clang. Previously it errored with: `cannot take address of consteval function 'x' outside of an immediate invocation  Bar() : a(x()) {}`

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

23 months ago[tsan] Keep thread/stack for closed FD
Vitaly Buka [Wed, 17 Aug 2022 20:44:53 +0000 (13:44 -0700)]
[tsan] Keep thread/stack for closed FD

Fixes b/242869837

Reviewed By: dvyukov

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

23 months agoRevert "[Driver] Support libc++ in MSVC"
Petr Hosek [Thu, 18 Aug 2022 08:22:43 +0000 (08:22 +0000)]
Revert "[Driver] Support libc++ in MSVC"

This reverts commit a4230319f7af786f4d947f39a870f339b32a6fe7.

This is causing build failures in the 2-stage build.

23 months ago[LoongArch] Supports brcond with 21 bit offsets
gonglingqin [Thu, 18 Aug 2022 07:37:12 +0000 (15:37 +0800)]
[LoongArch] Supports brcond with 21 bit offsets

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

23 months ago[DAGCombiner][NFC] Tidy up unnecessary brackets in visitADD.
wanglian [Thu, 18 Aug 2022 07:09:21 +0000 (15:09 +0800)]
[DAGCombiner][NFC] Tidy up unnecessary brackets in visitADD.

Reviewed By: sdesmalen

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

23 months ago[llvm-objdump] Support dumping segment information with -chained_fixups
Daniel Bertalan [Fri, 12 Aug 2022 13:10:58 +0000 (15:10 +0200)]
[llvm-objdump] Support dumping segment information with -chained_fixups

This commit adds the definitions for `dyld_chained_starts_in_image`,
`dyld_chained_starts_in_segment`, and related enums. Dumping their
contents is possible with the -chained_fixups flag of llvm-otool.

The chained-fixups.yaml test was changed to cover bindings/rebases, as
well as weak imports, weak symbols and flat namespace symbols. Now that
we have actual fixup entries, the __DATA segment contains data that
would need to be hexdumped in YAML. We also test empty pages (to look
for the "DYLD_CHAINED_PTR_START_NONE" annotation), so the YAML would end
up quite large. So instead, this commit includes a binary file.

When Apple's effort to upstream their chained fixups code continues,
we'll replace this code with the then-upstreamed code. But we need
something in the meantime for testing ld64.lld's chained fixups code.

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

23 months agoAdd missing bazel dep
David Blaikie [Thu, 18 Aug 2022 07:11:52 +0000 (07:11 +0000)]
Add missing bazel dep

23 months ago[test] Add 'hwasan' feature and disable a test
Vitaly Buka [Wed, 17 Aug 2022 18:49:38 +0000 (11:49 -0700)]
[test] Add 'hwasan' feature and disable a test

23 months ago[test][Sema] Ignore stderr in test
Vitaly Buka [Thu, 18 Aug 2022 06:35:15 +0000 (23:35 -0700)]
[test][Sema] Ignore stderr in test

Mixing stdout and stderr may break lines we try to match.

23 months ago[flang] Add specific TODO for the REDUCE instrinsic
Valentin Clement [Thu, 18 Aug 2022 05:53:26 +0000 (07:53 +0200)]
[flang] Add specific TODO for the REDUCE instrinsic

Add a proper TODO for the REDUCE instrinsic instead of crashing.

Reviewed By: PeteSteinfeld, vdonaldson

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

23 months ago[LoongArch] Add support for llvm.eh.dwarf.cfa
WANG Xuerui [Thu, 18 Aug 2022 05:08:19 +0000 (13:08 +0800)]
[LoongArch] Add support for llvm.eh.dwarf.cfa

It's the same as D126181 for RISCV.

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

23 months ago[clang][Interp] Implement boolean and nullptr literals
Timm Bäder [Fri, 5 Aug 2022 11:57:39 +0000 (13:57 +0200)]
[clang][Interp] Implement boolean and nullptr literals

Handle CXX bool literals as well as nullptr literals and add a few tests
for each.

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

23 months ago[RISCV] Add MC support of RISCV Zca Extension
WuXinlong [Tue, 16 Aug 2022 01:23:02 +0000 (09:23 +0800)]
[RISCV] Add MC support of RISCV Zca Extension

This patch adds support for part of Zc extension which will be frozen soon.

This extension is designed to continue reducing the binary size of RISC-V programs.
In this patch:
`Zca` is a subset of C extension instructions that are compatible with the Zc extension.

The spec of Zc ext is [[ https://github.com/riscv/riscv-code-size-reduction/releases | Here ]]

Reviewed By: craig.topper

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

23 months ago[Driver] Support libc++ in MSVC
Petr Hosek [Thu, 18 Aug 2022 03:33:34 +0000 (03:33 +0000)]
[Driver] Support libc++ in MSVC

This implements support for using libc++ headers in MSVC toolchain.
We only support libc++ headers that are part of the toolchain, and
not headers installed elsewhere on the system.

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

23 months ago[BOLT][NFC] Reformat strings in handleRelocation
Amir Ayupov [Thu, 18 Aug 2022 03:45:05 +0000 (20:45 -0700)]
[BOLT][NFC] Reformat strings in handleRelocation

With reduced indentation, some strings can be reformatted to take less lines.
Also strategically apply `formatv` to shorten them.

Reviewed By: rafauler

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

23 months ago[BOLT][NFC] Split out handleRelocation
Amir Ayupov [Thu, 18 Aug 2022 03:43:21 +0000 (20:43 -0700)]
[BOLT][NFC] Split out handleRelocation

Split out the body of a for-loop in `RewriteInstance::readRelocations` into a
separate function (`handleRelocation`). It's still over 300 lines of code,
so it's worth splitting down further.

Reviewed By: rafauler

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

23 months ago[DAGCombiner][NFC] Merge two if statement into one.
wanglian [Tue, 16 Aug 2022 06:23:38 +0000 (14:23 +0800)]
[DAGCombiner][NFC] Merge two if statement into one.

Reviewed By: RKSimon

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

23 months ago[test] Propagate HWASAN_OPTIONS
Vitaly Buka [Thu, 18 Aug 2022 01:44:41 +0000 (18:44 -0700)]
[test] Propagate HWASAN_OPTIONS

23 months ago[NFC][OpenMP] Simplify 2f9be69d843
Vitaly Buka [Sat, 13 Aug 2022 20:10:40 +0000 (13:10 -0700)]
[NFC][OpenMP] Simplify 2f9be69d843

23 months ago[NewGVN][PHIOFOPS] Bail out if an operand is in OpSafeForPHIOfOps but it is not safe...
Konstantina [Mon, 1 Aug 2022 05:25:32 +0000 (22:25 -0700)]
[NewGVN][PHIOFOPS] Bail out if an operand is in OpSafeForPHIOfOps but it is not safe for the current basic block.

NewGVN tables are not cleared out between the initial run of NewGVN and the verification. In case of phi-of-ops optimization, OpSafeForPHIOfOps goes out of sync between the two runs. One operand might not be safe for one basic block, but it might be safe for one of its successors. In this case, the operand will be added in OpSafeForPHIOfOps map. In verification phase, we reuse OpSafeForPHIOfOps without updating it again. As a result, the operand will be considered safe for phi-of-ops optimization even for the case that it is not. This patch fixes this problem.

Fix for 53807.

Reviewed By: asbirlea

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

23 months ago[mlir][spirv] Add arith.addi_carry to spv.IAddCarry conversion
Jakub Kuderski [Thu, 18 Aug 2022 01:32:00 +0000 (21:32 -0400)]
[mlir][spirv] Add arith.addi_carry to spv.IAddCarry conversion

Reviewed By: antiagainst

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

23 months ago[ORC][MachO] Fix MachOPlatform after 9189a26664b.
Lang Hames [Thu, 18 Aug 2022 00:46:37 +0000 (17:46 -0700)]
[ORC][MachO] Fix MachOPlatform after 9189a26664b.

Commit 9189a26664b caused llvm-jitlink to create bare JITDylibs to wrap real
dylibs loaded via -preload. This exposed a bug in MachOPlatform where we
assumed that all JITDylibs had been registered with the platform through
MachOPlatform::setupJITDylib (bare JITDylibs are _not_ run through this
function), and errored out where this was not the case.
This bug in MachOPlatform was causing test failures in compilert-rt:

Failed Tests (2):
  ORC-x86_64-darwin :: TestCases/Darwin/x86-64/trivial-objc-methods.S
  ORC-x86_64-darwin :: TestCases/Darwin/x86-64/trivial-swift-types-section.S

This commit fixes the issue by skipping JITDylibs that haven't been registered
with the platform via MachOPlatform::setupJITDylib.

23 months ago[WebAssembly] WebAssemblyLowerEmscriptenEHSjLj: Fix signature of malloc in wasm64...
Sam Clegg [Thu, 18 Aug 2022 00:54:03 +0000 (17:54 -0700)]
[WebAssembly] WebAssemblyLowerEmscriptenEHSjLj: Fix signature of malloc in wasm64 mode

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

23 months ago[BOLT][UTILS] Add nfc-check-setup --switch-back option
Amir Ayupov [Thu, 18 Aug 2022 00:37:13 +0000 (17:37 -0700)]
[BOLT][UTILS] Add nfc-check-setup --switch-back option

Add an option to switch repo revision back, handling stashing automatically.

Reviewed By: rafauler

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

23 months ago[mlir][sparse] more concise sparse tensor type printing
Aart Bik [Wed, 17 Aug 2022 23:59:08 +0000 (16:59 -0700)]
[mlir][sparse] more concise sparse tensor type printing

This change omits default values from the sparse tensor type,
saving considerable text real estate for the common cases.

Reviewed By: Peiming

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

23 months ago[BOLT][NFC] Simplify debug logging in case of JT heuristic failure
Amir Ayupov [Thu, 18 Aug 2022 00:34:49 +0000 (17:34 -0700)]
[BOLT][NFC] Simplify debug logging in case of JT heuristic failure

Move logging into LLVM_DEBUG scope.
Remove redundant printing of jump table parents:

Old logging:
```
failed to analyze jump table in function _ZN12_GLOBAL__N_116InitHeaderSearch23Ad
dDefaultCIncludePathsERKN4llvm6TripleERKN5clang19HeaderSearchOptionsE/1(*2)
PIC Jump table JUMP_TABLE/_ZN12_GLOBAL__N_116InitHeaderSearch23AddDefaultCInclud
ePathsERKN4llvm6TripleERKN5clang19HeaderSearchOptionsE/1.1 for function _ZN12_GL
OBAL__N_116InitHeaderSearch23AddDefaultCIncludePathsERKN4llvm6TripleERKN5clang19
HeaderSearchOptionsE/1(*2) at 0x65996e0 with a total count of 0:
  0x9dc

next jump table at 0x659a810 belongs to function _ZN5clang5Lexer40LexDependencyD
irectiveTokenWhileSkippingERNS_5TokenE
PIC Jump table JUMP_TABLE/_ZN5clang5Lexer40LexDependencyDirectiveTokenWhileSkipp
ingERNS_5TokenE.0 for function _ZN5clang5Lexer40LexDependencyDirectiveTokenWhile
SkippingERNS_5TokenE at 0x659a810 with a total count of 0:

jump table heuristic failure
```

New logging:
```
failed to analyze PIC Jump table JUMP_TABLE/_ZN12_GLOBAL__N_116InitHeaderSearch2
3AddDefaultCIncludePathsERKN4llvm6TripleERKN5clang19HeaderSearchOptionsE/1.1 for
function _ZN12_GLOBAL__N_116InitHeaderSearch23AddDefaultCIncludePathsERKN4llvm6T
ripleERKN5clang19HeaderSearchOptionsE/1(*2) at 0x65996e0 with a total count of 0:
  absolute offset: 0x52ac58c

next PIC Jump table JUMP_TABLE/_ZN5clang5Lexer40LexDependencyDirectiveTokenWhile
SkippingERNS_5TokenE.0 for function _ZN5clang5Lexer40LexDependencyDirectiveToken
WhileSkippingERNS_5TokenE at 0x659a810 with a total count of 0:

jump table heuristic failure
```

Reviewed By: rafauler

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

23 months ago[BOLT][NFC] Simplify scanExternalRefs
Amir Ayupov [Thu, 18 Aug 2022 00:33:38 +0000 (17:33 -0700)]
[BOLT][NFC] Simplify scanExternalRefs

Reviewed By: rafauler

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

23 months ago[BOLT][DWARF] Handle zero size DW_TAG_inlined_subroutine
Alexander Yermolovich [Thu, 18 Aug 2022 00:29:38 +0000 (17:29 -0700)]
[BOLT][DWARF] Handle zero size DW_TAG_inlined_subroutine

We were resetting DW_AT_low_pc to zero when DW_AT_high_pc was zero, or
DW_AT_low_pc == DW_AT_high_pc. This resulted in LLDB to print error "adding
range [0x0-0x0) which has a base that is less than the function's low PC".

Changed it so that when this case arises we set DW_AT_low_pc to the start
address.

Reviewed By: rafauler

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

23 months ago[amdgpu] Change the RA to basic
Luo, Yuanke [Tue, 16 Aug 2022 00:19:21 +0000 (08:19 +0800)]
[amdgpu] Change the RA to basic

Specifying `-regalloc=fast` is not reliable. With fast register allocation,
`LIS = getAnalysisIfAvailable<LiveIntervals>();` get nullptr
in "si-lower-sgpr-spills" pass, so the slot index is not created in the
pass for new inserted instructions. When verifying the machine
instructions, it fails on checking slot index. While greedy-ra is time
consuming basic-ra can be used to reduce compiling time for this test case.

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

23 months ago[mlir] Update when to check for non-null optional default attr
Jacques Pienaar [Thu, 18 Aug 2022 00:00:47 +0000 (17:00 -0700)]
[mlir] Update when to check for non-null optional default attr

OptionalAttr does the wrapping with Optional explicitly in ODS while
default valued optional attribute doesn't (and follows DefaultValuedAttr
in this behavior/meant as drop-in for updating old behavior), update
when to emit check for non-null to account for this.  Also add variant
for optional default valued string attribute to have same convenience as
default valued string attribute.

23 months ago[BOLT] Fix ignored LP at fragment start
Fabian Parzefall [Wed, 17 Aug 2022 23:34:43 +0000 (16:34 -0700)]
[BOLT] Fix ignored LP at fragment start

If the first block of a fragment is also a landing pad, the landing pad
is not used if an exception is thrown. This is because the landing pad
is at the same start address that the corresponding LSDA describes. In
that case, the offset in the call site records to refer to that landing
pad is zero, and a zero offset is interpreted by the personality
function as "no handler" and ignored.

Reviewed By: Amir

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

23 months ago[BOLT][NFC] Move printRelocationInfo into a method
Amir Ayupov [Wed, 17 Aug 2022 23:28:22 +0000 (16:28 -0700)]
[BOLT][NFC] Move printRelocationInfo into a method

Move this large lambda out of readRelocations into a standalone method.

Reviewed By: rafauler

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

23 months ago[AMDGPU] Implement pipeline solver for non-trivial pipelines
Jeffrey Byrnes [Wed, 20 Jul 2022 19:42:11 +0000 (12:42 -0700)]
[AMDGPU] Implement pipeline solver for non-trivial pipelines

Requested SchedGroup pipelines may be non-trivial to satisify. A minimimal example is if the requested pipeline is {2 VMEM, 2 VALU, 2 VMEM} and the original order of SUnits is {VMEM, VALU, VMEM, VALU, VMEM}. Because of existing dependencies, the choice of which SchedGroup the middle VMEM goes into impacts how closely we are able to match the requested pipeline. It seems minimizing the degree of misfit (as measured by the number of edges we can't add) w.r.t the choice we make when mapping an instruction -> SchedGroup is an NP problem. This patch implements the PipelineSolver class which produces a solution for the defined problem for the sched_group_barrier mutation. The solver has both an exponential time exact algorithm and a greedy algorithm. The patch includes some controls which allows the user to select the greedy/exact algorithm.

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

23 months ago[mlir] add missing pessimistic setting
Jacques Pienaar [Wed, 17 Aug 2022 22:08:37 +0000 (15:08 -0700)]
[mlir] add missing pessimistic setting

This is updated on https://reviews.llvm.org/D127139, to mark op with region as pessimistic.

Reviewed By: jpienaar

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

23 months ago[libc][Obvious] Update the static archive target name for libc-api-test.
Siva Chandra Reddy [Wed, 17 Aug 2022 23:18:05 +0000 (23:18 +0000)]
[libc][Obvious] Update the static archive target name for libc-api-test.

23 months ago[LLDB][NFC] Suppress spurious static inspection warnings
Slava Gurevich [Tue, 16 Aug 2022 21:09:46 +0000 (14:09 -0700)]
[LLDB][NFC] Suppress spurious static inspection warnings

Suppress coverity false positives.
This diff contains comments only, including the hints for Coverity static code inspection
to suppress the warning originating at the next line after the comment.

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

23 months ago[MLIR] Add dealloc alias check to bufferization
root [Wed, 17 Aug 2022 23:11:28 +0000 (19:11 -0400)]
[MLIR] Add dealloc alias check to bufferization

Traverse the cloneOp for aliases to find the alloc op

Reviewed By: frgossen, bondhugula

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

23 months ago[BOLT][NFC] Simplify addRelocation
Amir Ayupov [Wed, 17 Aug 2022 22:52:40 +0000 (15:52 -0700)]
[BOLT][NFC] Simplify addRelocation

Move the implementation out of the header file.
Simplify the method.
Add debug logging.

Reviewed By: rafauler

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

23 months ago[clang-format] Handle return type auto followed by l_paren
owenca [Wed, 17 Aug 2022 04:03:52 +0000 (21:03 -0700)]
[clang-format] Handle return type auto followed by l_paren

Fixes #57160.

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

23 months ago[DWARF][BOLT] Handle getBinaryFunctionContainingAddress returning nullptr for DW_TAG_...
Alexander Yermolovich [Wed, 17 Aug 2022 23:04:34 +0000 (16:04 -0700)]
[DWARF][BOLT] Handle getBinaryFunctionContainingAddress returning nullptr for DW_TAG_call_site

DW_TAG_call_site/DW_AT_call_return_pc can contain address that is not in any
function. In this case getBinaryFunctionContainingAddress returns nullptr. For
this case preserving original address.

Reviewed By: rafauler

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

23 months ago[JITLink] Fix typo in block address in unittest.
Lang Hames [Mon, 8 Aug 2022 04:55:03 +0000 (21:55 -0700)]
[JITLink] Fix typo in block address in unittest.

The address isn't currently used in this test but overlaps with Block B1,
which is a dubious state for a LinkGraph to be in.

23 months ago[JITLink] Pass Allocator (rather than storage) into Symbol named constructors.
Lang Hames [Tue, 2 Aug 2022 01:41:47 +0000 (15:41 -1000)]
[JITLink] Pass Allocator (rather than storage) into Symbol named constructors.

Also switch from orc::ExecutorAddrDiff to uint64_t for the Symbol::Size field.

These changes help to prepare for the introduction of symbol alias support:
Aliases will require an auxiliary data structure which will also need to be
allocated (hence the need to pass the allocator down). The Size field will be
re-tasked to track the auxiliary data (which will hold a replacement Size field)
if the symbol is either an alias, or aliased by some other symbol.

23 months ago[JITLink][MachO] Add support for non-subsections-via-symbols objects.
Lang Hames [Wed, 27 Jul 2022 17:56:22 +0000 (10:56 -0700)]
[JITLink][MachO] Add support for non-subsections-via-symbols objects.

This patch updates MachOLinkGraphBuilder to honor the MH_SUBSECTIONS_VIA_SYMBOLS
flag. Prior to this patch we assumed MH_SUBSECTIONS_VIA_SYMBOLS, but never
checked the flag.

If MH_SUBSECTIONS_VIA_SYMBOLS is set (the default for MachO output on modern
compilers) then MachOLinkGraphBuilder will break MachO section content into
jitlink::Blocks on symbol boundaries. (This is how JITLink has always handled
MachO sections previously).

If MH_SUBSECTIONS_VIA_SYMBOLS is not set then MachOLinkGraphBuilder will create
a single jitlink::Block for each MachO section.

Existing hand-written testcases that were _not_ using the
.subsections_via_symbols directive are updated to use it. A new testcase for
non-subsections-via-symbols behavior is included.

23 months ago[libc] Add a target to install libc in the full build mode.
Siva Chandra Reddy [Tue, 16 Aug 2022 20:27:31 +0000 (20:27 +0000)]
[libc] Add a target to install libc in the full build mode.

* In the full build mode, `ninja install-libc` will install the headers as
  well the static archive named libc.a.
* In the default mode, `ninja install-llvmlibc` will only install the
  static archive libllvmlibc.a.

Reviewed By: jeffbailey

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

23 months ago[BOLT] Remove old layout from function layout
Fabian Parzefall [Wed, 17 Aug 2022 22:06:15 +0000 (15:06 -0700)]
[BOLT] Remove old layout from function layout

To track whether a function's new layout is different from its old
layout when updating it, the old layout would be kept around in memory
indefinitely (if the new layout is different). This was used only for
debugging/logging purposes. This patch forces the caller of function
layout's update method to copy the old layout into a temporary if they
need it by removing the old layout fields.

Reviewed By: rafauler

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

23 months ago[BOLT] Add main fragment to function layout
Fabian Parzefall [Wed, 17 Aug 2022 21:51:29 +0000 (14:51 -0700)]
[BOLT] Add main fragment to function layout

Functions that do not contain any code still have to be emitted. This
occurs on AArch64 where functions can consist only of a constant island.
To support fragment semantics in code emission, this commits adds a
guaranteed main fragment to function layout. This fragment might be
empty, but allows us omit checks whether the function is empty in most
places.

Reviewed By: rafauler

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

23 months ago[NFCI] Move cost estimation from TargetLowering to TargetTransformInfo.
Daniil Fukalov [Wed, 17 Aug 2022 21:38:34 +0000 (00:38 +0300)]
[NFCI] Move cost estimation from TargetLowering to TargetTransformInfo.

TragetLowering had two last InstructionCost related `getTypeLegalizationCost()`
and `getScalingFactorCost()` members, but all other costs are processed in TTI.

E.g. it is not comfortable to use other TTI members in these two functions
overrided in a target.

Minor refactoring: `getTypeLegalizationCost()` now doesn't need DataLayout
parameter - it was always passed from TTI.

Reviewed By: RKSimon

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

23 months ago[libcxx] Fix using the vcruntime ABI with _HAS_EXCEPTIONS=0 defined
Paul Kirth [Wed, 17 Aug 2022 20:57:59 +0000 (20:57 +0000)]
[libcxx] Fix using the vcruntime ABI with _HAS_EXCEPTIONS=0 defined

_HAS_EXCEPTIONS=0 allows disabling the exception parts of the MS STL
and vcruntime, and e.g. compiler-rt/lib/fuzzer sets this define (to
work around issues with MS STL). If using libc++ instead of MS STL,
this define previously broke the libc++ headers.

If _HAS_EXCEPTIONS is set to 0, the vcruntime_exception.h header
doesn't define the ABI base class std::exception. If no exceptions
are going to be thrown, this probably is fine (although it also
breaks using subclasses of it as regular objects that aren't thrown),
but it requires ifdeffing out all subclasses of all exception/error
derived objects (which are sprinkled throughout the headers).

Instead, libc++ will supply an ABI compatible definition when
_HAS_EXCEPTIONS is set to 0, which will make the class hierarchies
complete.

In this build configuration, one can still create instances of
exception subclasses, and those objects will be ABI incompatible
with the ones from when _HAS_EXCEPTIONS isn't defined to 0 - but
one may argue that's a pathological/self-imposed problem in that case.

Reviewed By: #libc, ldionne

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

23 months ago[Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initia...
Shafik Yaghmour [Wed, 17 Aug 2022 20:54:14 +0000 (13:54 -0700)]
[Clang] Tighten restrictions on enum out of range diagnostic to avoid constant initialization

The restrictions added in D131704 were not sufficient to avoid all non-constant
expression contexts. In particular constant initialization cases.

We need to check EvaluatingDecl to detect if the variable we are initializing is
constexpr or not.

At this point it looks like this is the remaining case affecting various projects
with this diagnostic.

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

23 months ago[tests] Precommit tests for phi recusion limits in known bits
Philip Reames [Wed, 17 Aug 2022 20:58:56 +0000 (13:58 -0700)]
[tests] Precommit tests for phi recusion limits in known bits

23 months ago[mlir] Add arith.addi_carry op
Jakub Kuderski [Wed, 17 Aug 2022 20:31:30 +0000 (16:31 -0400)]
[mlir] Add arith.addi_carry op

The `arith.addi_carry` op implements integer addition with overflows. The carry is returned via the second result, as `i1`.

Reviewed By: antiagainst, bondhugula

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

23 months ago[NFC][tsan] Use AddThread(Tid tid...
Vitaly Buka [Wed, 17 Aug 2022 20:52:13 +0000 (13:52 -0700)]
[NFC][tsan] Use AddThread(Tid tid...

23 months ago[flang] Control SUM simplification with a pass option.
Slava Zakharin [Thu, 11 Aug 2022 02:40:01 +0000 (19:40 -0700)]
[flang] Control SUM simplification with a pass option.

The current code may not always work correctly, e.g.:
https://github.com/llvm/llvm-project/issues/57201

I added 'enable-experimental' pass option so that SUM simplification
may be enabled in LIT tests, but it is not enabled when the pass
is added to the passes pipeline.

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