Changes

Changes from Git (git http://labmaster3.local/git/llvm-zorg.git)

Summary

  1. Disable GPU in polly-arm-linux and aosp-O3-polly-before-vectorizer-unprofitable (details)
Commit f09bb849f94c1fbf105185bc0ff164e2a421f638 by kparzysz
Disable GPU in polly-arm-linux and aosp-O3-polly-before-vectorizer-unprofitable
The file was modifiedbuildbot/osuosl/master/config/builders.py

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [llvm] Update tests that got missed in adee485adf84ae8a. (details)
  2. [mlir][linalg] Change the FillOp library call signature. (details)
  3. [IR] Simplify createReplacementInstr (details)
  4. [AMDGPU] Stop using LegacyLegalizerInfo. NFCI. (details)
  5. [mlir][LLVMIR] Fold ExtractValueOp coming from InsertValueOp (details)
  6. [LLParser] Remove special handling for call address space (details)
  7. [TTI] Make assertion compatible with opaque pointers (details)
  8. [Verifier] Fail on overrunning and invalid indices for {insert,extract} vector intrinsics (details)
  9. [lldb] Remove CommandReturnObject's SetError(StringRef) (details)
  10. [InstSimplify] Add more poison folding optimizations (details)
  11. Add support for #pragma system_header with -fms-extensions (details)
  12. [NFCI-ish][SimplifyCFGPass] Rework and generalize `ret` block tail-merging (details)
  13. [AIX][PowerPC] Remove error when specifying mabi=vec-default on AIX (details)
  14. [clang-format] Fix a bug that indents else-comment-if incorrectly (details)
  15. [AArch64] Add CodeGen tests for vector reduction intrinsics. NFC (details)
  16. [lldb][NFC] Remove some redundant semicolons on HostInfoMacOSX (details)
  17. [lldb] Remove asserts in CommandReturnObject SetError and AppendError (details)
  18. [ARMParallelDSP] Remove unnecessary wrapper function (NFC) (details)
  19. [NFC][ARM] Fix update_llc_test_checks for armv7-apple-ios, autogenerate ifcvt5.ll/ifcvt6.ll (details)
  20. [NFC][ARM] Fix update_llc_test_checks for thumbv7-apple-ios, autogenerate switch-minsize.ll (details)
  21. [NFC][ARM] Fix update_llc_test_checks for aarch64-apple-ios/thumbv7s-apple-darwin, autogenerate a few tests (details)
  22. [NFC][AArch64] Autogenerate a few more tests (details)
  23. [NFC][ARM] Fix update_llc_test_checks for thumbv7-apple-darwin, autogenerate thumb2-ifcvt1.ll (details)
  24. [AMDGPU] Remove unused multiclass MUBUF_Real_gfx10_with_name (details)
  25. Handle interactions between reserved identifier and user-defined suffixes (details)
  26. [NFC] Update arm_function_name.ll after 4de0c400317e5a92d57f2c76545061a9e7de22f8 (details)
  27. [libc++] Remove ad-hoc modules tests that are now unnecessary (details)
  28. [OpenMP] Improve ref count debug messages (details)
  29. [OpenMP] Fix delete map type in ref count debug messages (details)
  30. [DAGCombine] Check reassoc flags in aggressive fsub fusion (details)
  31. [libc] add benchmarks for memcmp and bzero (details)
  32. [OpenMP][AMDGCN] Apply fix for isnan, isinf and isfinite for amdgcn. (details)
  33. [InstCombine] convert FP min/max with negated op to fabs (details)
  34. [RISCV] Add explicit copy to V0 in the masked vmsge(u).vx intrinsic handling. (details)
  35. [UpdateCCTestChecks][NFC] Permit other comments in common.py (details)
  36. [InstCombine] Eliminate casts to optimize ctlz operation (details)
  37. [ARM] Limit v6m unrolling with multiple live outs (details)
  38. [ValueTracking] look through bitcast of vector in computeKnownBits (details)
  39. [clang-format] Add IfMacros option (details)
  40. Update Bazel BUILD files up to be9a87fe9b (details)
  41. [Demangle][Rust] Hide implementation details NFC (details)
  42. [LAA] Make getPointersDiff() API compatible with opaque pointers (details)
  43. [ConstantFold] Allow propagation of poison for and/or i1 (details)
  44. [libcxx][views] Add drop_view. (details)
  45. [gn build] Port 560170fa2de5 (details)
  46. [MLIR][LLVM] Expose type translator from LLVM to MLIR Type (details)
  47. Revert "[MLIR][LLVM] Expose type translator from LLVM to MLIR Type" (details)
  48. [Attributor] Derive AAFunctionReachability attribute. (details)
  49. Improve error handling in llvm-dwarfdump. (details)
  50. clang-format llvm-dwarfdump.cpp (details)
  51. [OpaquePtr] Mangle intrinsics with opaque pointers arguments (details)
  52. ThinLTO: Fix inline assembly references to static functions with CFI (details)
  53. [OpaquePtr] Support call instruction (details)
  54. Fix flang build after D104167 (details)
  55. [TextAPI] add symbol name prefixes to central location, NFC (details)
  56. [OpaquePtr] Support invoke instruction (details)
  57. [lld/mac] Don't crash on absolute symbols in unwind info generation (details)
  58. [InstCombine] Use getFunctionType() (details)
  59. [llvm-tapi-diff] Wrap empty string around StringLiteral NFC (details)
  60. [compiler-rt][hwasan] Add InitState options to thread initialization (details)
  61. Update test after https://reviews.llvm.org/D104483 (details)
  62. [Constants] Handle addrspacecast with opaque pointer type (details)
  63. Move dwarfdump-invalid.test into the tools/llvm-dwarfdump directory. (details)
  64. Reland "[AArch64] handle -Wa,-march=" (details)
  65. IR: Fix use-list-order round-tripping for call and invoke (details)
  66. [docs][GISel]Added GISel documentation link (details)
  67. [AMDGPU] Check for pointer operand while refining LDS align (details)
  68. [IRSim] Adding basic implementation of llvm-sim. (details)
  69. [NFC][ScalarEvolution] Fix SCEVNAryExpr::getType(). (details)
  70. [ScalarEvolution] Clarify implementation of getPointerBase(). (details)
  71. [Polly] Fix test after D104732. (details)
  72. [flang] Tweak the conditions for the GCC 7/libstdc++ workaround (details)
Commit aa58fdb3960bf1ea25c2c088fba96700cb7e7071 by flo
[llvm] Update tests that got missed in adee485adf84ae8a.
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/X86/nested-loop.ll
The file was modifiedllvm/test/Transforms/LoopVersioningLICM/loopversioningLICM2.ll
Commit f1844f15c1ad54b78f2d84087df4b51fe5f703f6 by gysit
[mlir][linalg] Change the FillOp library call signature.

Adapt the FillOp library call signature to the updated operand order introduced in https://reviews.llvm.org/D10412. The patch reverts the special treatment of FillOp in LinalgToStandard.

Differential Revision: https://reviews.llvm.org/D104360
The file was modifiedmlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
Commit 157473a58f02b8f2ad12ecbaaa1af32d0342257b by jay.foad
[IR] Simplify createReplacementInstr

NFCI, although the test change shows that ConstantExpr::getAsInstruction
is better than the old implementation of createReplacementInstr because
it propagates things like the sdiv "exact" flag.

Differential Revision: https://reviews.llvm.org/D104124
The file was modifiedllvm/lib/IR/ReplaceConstant.cpp
The file was modifiedclang/test/CodeGenCUDA/managed-var.cu
Commit dfb8c0873984e24ac98a41a372dbe31d8feb629e by jay.foad
[AMDGPU] Stop using LegacyLegalizerInfo. NFCI.

Differential Revision: https://reviews.llvm.org/D103684
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Commit f0d43a29e30da8f2758e17e1c242917288ab9a0b by nicolas.vasilache
[mlir][LLVMIR] Fold ExtractValueOp coming from InsertValueOp

Differential Revision: https://reviews.llvm.org/D104769
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was addedmlir/test/Dialect/LLVMIR/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
Commit 3ee6f1a4fa83fa1e737324e77c27d3cc967d36bc by nikita.ppv
[LLParser] Remove special handling for call address space

Spin-off from D104740: I don't think this special handling is needed
anymore. Calls in textual IR are annotated with addrspace(N) (which
defaults to the program address space from data layout) and specifies
the expected pointer address space of the callee. There is no need
to special-case the program address space on top of that, as it
already is the default expected address space, and we shouldn't
allow use of the program address space if the call was explicitly
annotated with some other address space.

The IsCall parameter is retained because it will be used again soon.

Differential Revision: https://reviews.llvm.org/D104752
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
Commit cfb1cb4491d7aac218d9fd903a69b46bbc21118b by nikita.ppv
[TTI] Make assertion compatible with opaque pointers

Dropping the TODO here because it applies to all uses of this method.
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
Commit 3c4dbf6ea9a06d0e5b460895bc5677ca7e382b4e by joe.ellis
[Verifier] Fail on overrunning and invalid indices for {insert,extract} vector intrinsics

With regards to overrunning, the langref (llvm/docs/LangRef.rst)
specifies:

   (llvm.experimental.vector.insert)
   Elements ``idx`` through (``idx`` + num_elements(``subvec``) - 1)
   must be valid ``vec`` indices. If this condition cannot be determined
   statically but is false at runtime, then the result vector is
   undefined.

   (llvm.experimental.vector.extract)
   Elements ``idx`` through (``idx`` + num_elements(result_type) - 1)
   must be valid vector indices. If this condition cannot be determined
   statically but is false at runtime, then the result vector is
   undefined.

For the non-mixed cases (e.g. inserting/extracting a scalable into/from
another scalable, or inserting/extracting a fixed into/from another
fixed), it is possible to statically check whether or not the above
conditions are met. This was previously missing from the verifier, and
if the conditions were found to be false, the result of the
insertion/extraction would be replaced with an undef.

With regards to invalid indices, the langref (llvm/docs/LangRef.rst)
specifies:

    (llvm.experimental.vector.insert)
    ``idx`` represents the starting element number at which ``subvec``
    will be inserted. ``idx`` must be a constant multiple of
    ``subvec``'s known minimum vector length.

    (llvm.experimental.vector.extract)
    The ``idx`` specifies the starting element number within ``vec``
    from which a subvector is extracted. ``idx`` must be a constant
    multiple of the known-minimum vector length of the result type.

Similarly, these conditions were not previously enforced in the
verifier. In some circumstances, invalid indices were permitted
silently, and in other circumstances, an undef was spawned where a
verifier error would have been preferred.

This commit adds verifier checks to enforce the constraints above.

Differential Revision: https://reviews.llvm.org/D104468
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll
The file was addedllvm/test/Verifier/insert-extract-intrinsics-invalid.ll
The file was modifiedllvm/test/Transforms/InstCombine/canonicalize-vector-insert.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-insert-vector.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert-subvector.ll
The file was modifiedllvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-opts-cmpne.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-extract-vector.ll
The file was modifiedllvm/test/Transforms/InstCombine/canonicalize-vector-extract.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
Commit 1b1c8e4a984c07a3c985408d3d80c8e24e60d3d1 by david.spickett
[lldb] Remove CommandReturnObject's SetError(StringRef)

Replacing existing uses with AppendError.

SetError is also part of the SBI API. This remains
but instead of calling the underlying SetError it
will call AppendError.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D104768
The file was modifiedlldb/source/Commands/CommandObjectBreakpoint.cpp
The file was modifiedlldb/source/Commands/CommandObjectMultiword.cpp
The file was modifiedlldb/include/lldb/Interpreter/CommandReturnObject.h
The file was modifiedlldb/source/Commands/CommandObjectType.cpp
The file was modifiedlldb/source/Interpreter/CommandObject.cpp
The file was modifiedlldb/source/API/SBCommandReturnObject.cpp
The file was modifiedlldb/source/Commands/CommandObjectThread.cpp
The file was modifiedlldb/source/Interpreter/CommandReturnObject.cpp
The file was modifiedlldb/source/Commands/CommandObjectReproducer.cpp
The file was modifiedlldb/source/Commands/CommandObjectTrace.cpp
The file was modifiedlldb/source/Commands/CommandObjectProcess.cpp
Commit 5af8bacc940243038478da1c92c3481cbdfcece3 by aqjune
[InstSimplify] Add more poison folding optimizations

This adds more poison folding optimizations to InstSimplify.

Since all binary operators propagate poison, these are fine.

Also, the precondition of `select cond, undef, x` -> `x` is relaxed to allow the case when `x` is undef.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D104661
The file was modifiedllvm/test/Transforms/InstCombine/and-narrow.ll
The file was modifiedllvm/test/Transforms/InstSimplify/and.ll
The file was modifiedllvm/test/Transforms/InstSimplify/or.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstCombine/select-binop-cmp.ll
The file was modifiedllvm/test/Transforms/InstSimplify/mul.ll
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/poison.ll
The file was modifiedllvm/test/Transforms/InstSimplify/select-inseltpoison.ll
The file was modifiedllvm/test/Transforms/InstCombine/getelementptr.ll
The file was modifiedllvm/test/Transforms/InstSimplify/shift.ll
The file was modifiedllvm/test/Transforms/InstSimplify/select.ll
The file was modifiedllvm/test/Transforms/InstSimplify/sub.ll
The file was modifiedllvm/test/Transforms/InstSimplify/fcmp.ll
Commit 24037c37b6c4043faae7bf396b735e1ba36e46e0 by hans
Add support for #pragma system_header with -fms-extensions

Clang already supports the pragma prefixed by "GCC" or "clang".

MSVC has more recently added support for the pragma, but without any prefix; see
https://devblogs.microsoft.com/cppblog/broken-warnings-theory/#external-headers

Differential revision: https://reviews.llvm.org/D104770
The file was modifiedclang/lib/Lex/Pragma.cpp
The file was modifiedclang/test/Preprocessor/pragma_sysheader.c
The file was removedclang/test/Preprocessor/pragma_sysheader.h
The file was addedclang/test/Preprocessor/Inputs/pragma_sysheader.h
The file was modifiedclang/test/Lexer/pragma-operators.cpp
Commit ff4b1d379f3f3d2dfd9f9b4fc5715676024b8024 by lebedev.ri
[NFCI-ish][SimplifyCFGPass] Rework and generalize `ret` block tail-merging

This changes the approach taken to tail-merge the blocks
to always create a new block instead of trying to reuse some block,
and generalizes it to support dealing not with just the `ret` in the future.

This effectively lifts the CallBr restriction, although this isn't really intentional.
That is the only non-NFC change here, i'm not sure if it's reasonable/feasible to temporarily retain it.

Other restrictions of the transform remain.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D104598
The file was modifiedllvm/test/Transforms/SimplifyCFG/FoldValueComparisonIntoPredecessors-no-new-successors.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/SimplifyEqualityComparisonWithOnlyPredecessor-domtree-preservation-edgecase.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/pr48778-sdiv-speculation.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/return-merge.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/switch-masked-bits.ll
The file was modifiedllvm/test/CodeGen/ARM/speculation-hardening-sls.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/suppress-zero-branch-weights.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/ARM/upperbound.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/FoldValueComparisonIntoPredecessors-domtree-preservation-edgecase.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/rangereduce.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/basictest.ll
The file was modifiedllvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
Commit 76c931ae42cf1080199a238446306e8554ebb6de by zarko
[AIX][PowerPC] Remove error when specifying mabi=vec-default on AIX

The default Altivec ABI was implemented but the clang error for specifying
its use still remains.  Users could get around this but not specifying the
type of Altivec ABI but we need to remove the error.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D102094
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/test/CodeGen/altivec.c
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
The file was removedclang/test/Driver/aix-vec-extabi.c
The file was addedclang/test/Driver/aix-vec_extabi.c
The file was modifiedclang/test/Preprocessor/aix-vec_extabi.c
Commit ca7f4715858137dc97ac782cead65ba706bffa3c by owenca
[clang-format] Fix a bug that indents else-comment-if incorrectly

PR50809

Differential Revision: https://reviews.llvm.org/D104774
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
Commit 12cb8ca6686041990f83eab1897b41f70f6f123c by rosie.sumpter
[AArch64] Add CodeGen tests for vector reduction intrinsics. NFC

Tests are added for vector reduce OR, AND and XOR.

Differential Revision: https://reviews.llvm.org/D104771
The file was addedllvm/test/CodeGen/AArch64/reduce-and.ll
The file was addedllvm/test/CodeGen/AArch64/reduce-or.ll
The file was addedllvm/test/CodeGen/AArch64/reduce-xor.ll
Commit 8a5165b3b9f20017ad28e28d7bc519f1855f0bfa by Raphael Isemann
[lldb][NFC] Remove some redundant semicolons on HostInfoMacOSX
The file was modifiedlldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
Commit fe63db25bcc0dd31fc471f60591a0f24ee8dbf57 by david.spickett
[lldb] Remove asserts in CommandReturnObject SetError and AppendError

I added asserts to these in https://reviews.llvm.org/D104525.
They are available (directly or otherwise) via the API so we
should not assert.

Restore the previous behaviour. If the message
is empty, we return early before printing anything.
For SetError don't assert that the error is a failure.

The remaining assert is in AppendRawError which
is not part of the API.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D104778
The file was modifiedlldb/source/Interpreter/CommandReturnObject.cpp
Commit 8c01deb8e65490d730e8a2eac1e4ffa8822ce992 by nikita.ppv
[ARMParallelDSP] Remove unnecessary wrapper function (NFC)

AreSequentialAccesses() forwards directly to isConsecutiveAccess()
and has an unnecessary template parameter to boot.
The file was modifiedllvm/lib/Target/ARM/ARMParallelDSP.cpp
Commit 4de0c400317e5a92d57f2c76545061a9e7de22f8 by lebedev.ri
[NFC][ARM] Fix update_llc_test_checks for armv7-apple-ios, autogenerate ifcvt5.ll/ifcvt6.ll
The file was modifiedllvm/test/CodeGen/ARM/ifcvt5.ll
The file was modifiedllvm/test/CodeGen/ARM/ifcvt6.ll
The file was modifiedllvm/utils/UpdateTestChecks/asm.py
Commit 15be15073ef6eb2c4fd734917322909d405f16e2 by lebedev.ri
[NFC][ARM] Fix update_llc_test_checks for thumbv7-apple-ios, autogenerate switch-minsize.ll
The file was modifiedllvm/test/CodeGen/ARM/switch-minsize.ll
The file was modifiedllvm/utils/UpdateTestChecks/asm.py
Commit 3c94869632d3f762c1699d4d920c1ac2721b95c0 by lebedev.ri
[NFC][ARM] Fix update_llc_test_checks for aarch64-apple-ios/thumbv7s-apple-darwin, autogenerate a few tests
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/swifterror.ll
The file was modifiedllvm/test/CodeGen/AArch64/branch-relax-asm.ll
The file was modifiedllvm/test/CodeGen/ARM/ifcvt-iter-indbr.ll
The file was modifiedllvm/utils/UpdateTestChecks/asm.py
The file was modifiedllvm/test/CodeGen/AArch64/swifterror.ll
Commit b77972ac4f05a45fabdd76f60ac1deb5816512b5 by lebedev.ri
[NFC][AArch64] Autogenerate a few more tests
The file was modifiedllvm/test/CodeGen/AArch64/sve-breakdown-scalable-vectortype.ll
The file was modifiedllvm/test/CodeGen/AArch64/check-sign-bit-before-extension.ll
Commit eb7ce97870d919961f5a41804d33684abbef1188 by lebedev.ri
[NFC][ARM] Fix update_llc_test_checks for thumbv7-apple-darwin, autogenerate thumb2-ifcvt1.ll
The file was modifiedllvm/test/CodeGen/Thumb2/thumb2-ifcvt1.ll
The file was modifiedllvm/utils/UpdateTestChecks/asm.py
Commit a16cb95a3a44b471fcbdb67b0844de9018b27873 by jay.foad
[AMDGPU] Remove unused multiclass MUBUF_Real_gfx10_with_name
The file was modifiedllvm/lib/Target/AMDGPU/BUFInstructions.td
Commit a0d05ed848990c06c6dcdfc2e37bc8f13f7fe470 by sguelton
Handle interactions between reserved identifier and user-defined suffixes

According to https://eel.is/c++draft/over.literal

> double operator""_Bq(long double);  // OK: does not use the reserved identifier _­Bq ([lex.name])
> double operator"" _Bq(long double); // ill-formed, no diagnostic required: uses the reserved identifier _­Bq ([lex.name])

Obey that rule by keeping track of the operator literal name status wrt. leading whitespace.

Fix: https://bugs.llvm.org/show_bug.cgi?id=50644

Differential Revision: https://reviews.llvm.org/D104299
The file was modifiedclang/lib/AST/Decl.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/lib/Parse/ParseExprCXX.cpp
The file was modifiedclang/test/Sema/reserved-identifier.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
Commit 707224ea16f67c9a4fb97e89f5599838fd622841 by lebedev.ri
[NFC] Update arm_function_name.ll after 4de0c400317e5a92d57f2c76545061a9e7de22f8
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/arm_function_name.ll.expected
Commit 0c0628c92c0d3638f5739ecb28ba554347feccdf by Louis Dionne
[libc++] Remove ad-hoc modules tests that are now unnecessary

Since we now have modules-enabled CI, it is now redundant to have ad-hoc
tests that check arbitrary things about our modules support. Instead,
the whole test suite should pass with modules enabled, period.

This patch also removes the module cache path workaround: one would
expect that modules work properly without that workaround. If that
isn't the case and we do run into flaky test failures, we can re-enable
the workaround temporarily (but that would be very vexing and we should
fix Clang ASAP if that's the case).

Differential Revision: https://reviews.llvm.org/D104746
The file was removedlibcxx/test/libcxx/modules/cstdint_exports.compile.pass.cpp
The file was removedlibcxx/test/libcxx/modules/inttypes_h_exports.compile.pass.cpp
The file was removedlibcxx/test/libcxx/modules/stds_include.sh.cpp
The file was removedlibcxx/test/libcxx/modules/cinttypes_exports.compile.pass.cpp
The file was removedlibcxx/test/libcxx/modules/clocale_exports.compile.pass.cpp
The file was modifiedlibcxx/utils/libcxx/test/features.py
The file was removedlibcxx/test/libcxx/modules/stdint_h_exports.compile.pass.cpp
Commit 48421ac441bf64ec940b13c2dee1bc1a7671e878 by jdenny.ornl
[OpenMP] Improve ref count debug messages

For example, without this patch:

```
$ cat test.c
int main() {
  int x;
  #pragma omp target enter data map(alloc: x)
  #pragma omp target exit data map(release: x)
  ;
  return 0;
}
$ clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda test.c
$ LIBOMPTARGET_DEBUG=1 ./a.out |& grep 'Creating\|Mapping exists'
Libomptarget --> Creating new map entry with HstPtrBegin=0x00007ffcace8e448, TgtPtrBegin=0x00007f12ef600000, Size=4, Name=unknown
Libomptarget --> Mapping exists with HstPtrBegin=0x00007ffcace8e448, TgtPtrBegin=0x00007f12ef600000, Size=4, updated RefCount=1
```

There are two problems in this example:

* `RefCount` is not reported when a mapping is created, but it might
  be 1 or infinite.  In this case, because it's created by `omp target
  enter data`, it's 1.  Seeing that would make later `RefCount`
  messages easier to understand.
* `RefCount` is still 1 at the `omp target exit data`, but it's
  reported as `updated`.  The reason it's still 1 is that, upon
  deletions, the reference count is generally not updated in
  `DeviceTy::getTgtPtrBegin`, where the report is produced.  Instead,
  it's zeroed later in `DeviceTy::deallocTgtPtr`, where it's actually
  removed from the mapping table.

This patch makes the following changes:

* Report the reference count when creating a mapping.
* Where an existing mapping is reported, always report a reference
  count action:
    * `update suppressed` when `UpdateRefCount=false`
    * `incremented`
    * `decremented`
    * `deferred final decrement`, which replaces the misleading
      `updated` in the above example
* Add comments to `DeviceTy::getTgtPtrBegin` to explain why it does
  not zero the reference count.  (Please advise if these comments miss
  the point.)
* For unified shared memory, don't report confusing messages like
  `RefCount=` or `RefCount= updated` given that reference counts are
  irrelevant in this case.  Instead, just report `for unified shared
  memory`.
* Use `INFO` not `DP` consistently for `Mapping exists` messages.
* Fix device table dumps to print `INF` instead of `-1` for an
  infinite reference count.

Reviewed By: jhuber6, grokos

Differential Revision: https://reviews.llvm.org/D104559
The file was modifiedopenmp/libomptarget/test/offloading/info.c
The file was modifiedopenmp/docs/design/Runtimes.rst
The file was modifiedopenmp/libomptarget/src/device.cpp
The file was modifiedopenmp/libomptarget/src/private.h
The file was modifiedopenmp/libomptarget/src/device.h
Commit 9fa5e3280d0bfdb90e3f2823f5bc63446628682d by jdenny.ornl
[OpenMP] Fix delete map type in ref count debug messages

For example, without this patch:

```
$ cat test.c
int main() {
  int x;
  #pragma omp target enter data map(alloc: x)
  #pragma omp target enter data map(alloc: x)
  #pragma omp target enter data map(alloc: x)
  #pragma omp target exit data map(delete: x)
  ;
  return 0;
}
$ clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda test.c
$ LIBOMPTARGET_DEBUG=1 ./a.out |& grep 'Creating\|Mapping exists\|last'
Libomptarget --> Creating new map entry with HstPtrBegin=0x00007ffddf1eaea8, TgtPtrBegin=0x00000000013bb040, Size=4, RefCount=1, Name=unknown
Libomptarget --> Mapping exists with HstPtrBegin=0x00007ffddf1eaea8, TgtPtrBegin=0x00000000013bb040, Size=4, RefCount=2 (incremented), Name=unknown
Libomptarget --> Mapping exists with HstPtrBegin=0x00007ffddf1eaea8, TgtPtrBegin=0x00000000013bb040, Size=4, RefCount=3 (incremented), Name=unknown
Libomptarget --> Mapping exists with HstPtrBegin=0x00007ffddf1eaea8, TgtPtrBegin=0x00000000013bb040, Size=4, RefCount=2 (decremented)
Libomptarget --> There are 4 bytes allocated at target address 0x00000000013bb040 - is not last
```

`RefCount` is reported as decremented to 2, but it ought to be reset
because of the `delete` map type, and `is not last` is incorrect.

This patch migrates the reset of reference counts from
`DeviceTy::deallocTgtPtr` to `DeviceTy::getTgtPtrBegin`, which then
correctly reports the reset.  Based on the `IsLast` result from
`DeviceTy::getTgtPtrBegin`, `targetDataEnd` then correctly reports `is
last` for any deletion.  `DeviceTy::deallocTgtPtr` is responsible only
for the final reference count decrement and mapping removal.

An obscure side effect of this patch is that a `delete` map type when
the reference count is infinite yields `DelEntry=IsLast=false` in
`targetDataEnd` and so no longer results in a
`DeviceTy::deallocTgtPtr` call.  Without this patch, that call is a
no-op anyway besides some unnecessary locking and mapping table
lookups.

Reviewed By: grokos

Differential Revision: https://reviews.llvm.org/D104560
The file was modifiedopenmp/libomptarget/src/device.h
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/device.cpp
Commit c125af82a5ff5dbbbcb8ebc5cde156d41e6ac281 by Jinsong Ji
[DAGCombine] Check reassoc flags in aggressive fsub fusion

The is from discussion in https://reviews.llvm.org/D104247#inline-993387

The contract and reassoc flags shouldn't imply each other .

All the aggressive fsub fusion reassociate operations,
we should guard them with reassoc flag check.

Reviewed By: mcberg2017

Differential Revision: https://reviews.llvm.org/D104723
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/fma-assoc.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fpext-free.ll
Commit 87065c0d242d955e6f3fddf5cbc790d025c3521c by gchatelet
[libc] add benchmarks for memcmp and bzero

Differential Revision: https://reviews.llvm.org/D104511
The file was modifiedlibc/src/string/CMakeLists.txt
The file was modifiedlibc/benchmarks/CMakeLists.txt
The file was modifiedlibc/benchmarks/LibcMemoryBenchmarkMain.cpp
Commit 5dfdc1812d9b9c043204d39318f6446424d8f2d7 by jonathanchesterfield
[OpenMP][AMDGCN] Apply fix for isnan, isinf and isfinite for amdgcn.

This fixes issues with various return types(bool/int) and was already
in place for nvptx headers, adjusted to work for amdgcn. This does
not affect hip as the change is guarded with OPENMP_AMDGCN.
Similar to D85879.

Reviewed By: jdoerfert, JonChesterfield, yaxunl

Differential Revision: https://reviews.llvm.org/D104677
The file was modifiedclang/test/Headers/openmp_device_math_isnan.cpp
The file was modifiedclang/test/Headers/hip-header.hip
The file was modifiedclang/lib/Headers/__clang_hip_cmath.h
Commit 1e9b6b89a7b5c49612018b120c2c142106056f82 by spatel
[InstCombine] convert FP min/max with negated op to fabs

This is part of improving floating-point patterns seen in:
https://llvm.org/PR39480

We don't require any FMF because the 2 potential corner cases
(-0.0 and NaN) are correctly handled without FMF:
1. -0.0 is treated as strictly less than +0.0 with
   maximum/minimum, so fabs/fneg work as expected.
2. +/- 0.0 with maxnum/minnum is indeterminate, so
   transforming to fabs/fneg is more defined.
3. The sign of a NaN may be altered by this transform,
   but that is allowed in the default FP environment.

If there are FMF, they are propagated from the min/max call to
one or both new operands which seems to agree with Alive2:
https://alive2.llvm.org/ce/z/bem_xC
The file was modifiedllvm/test/Transforms/InstCombine/minnum.ll
The file was modifiedllvm/test/Transforms/InstCombine/maximum.ll
The file was modifiedllvm/test/Transforms/InstCombine/maxnum.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/minimum.ll
Commit a37cf17834d39411ed1d669098b428f8374c5b45 by craig.topper
[RISCV] Add explicit copy to V0 in the masked vmsge(u).vx intrinsic handling.

This is consistent with our other masked vector instructions.
Previously we found cases where not doing this broke fast reg
alloc.
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Commit 38b7b1d4a2930cc82e69a8069fad4b363f73a212 by jdenny.ornl
[UpdateCCTestChecks][NFC] Permit other comments in common.py

Some parts of common.py already permit comment styles besides `;`.
Handle the remaining cases.  Specifically, a future patch will extend
update_cc_test_checks.py to call add_global_checks.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D104713
The file was modifiedllvm/utils/UpdateTestChecks/common.py
Commit ad0085d3381a28041244fe6847f6ac1ce8dd052e by spatel
[InstCombine] Eliminate casts to optimize ctlz operation

If a ctlz operation is performed on higher datatype and then
downcasted, then this can be optimized by doing a ctlz operation
on a lower datatype and adding the difference bitsize to the result
of ctlz to provide the same output:

https://alive2.llvm.org/ce/z/8uup9M

The original problem is shown in
https://llvm.org/PR50173

Differential Revision: https://reviews.llvm.org/D103788
The file was modifiedllvm/test/Transforms/InstCombine/zext-ctlz-trunc-to-ctlz-add.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 8cfc08013299d873edd364436aa78e7effb28dd4 by david.green
[ARM] Limit v6m unrolling with multiple live outs

v6m cores only have a limited number of registers available. Unrolling
can mean we spend more on stack spills and reloads than we save from the
unrolling. This patch adds an extra heuristic to put a limit on the
unroll count for loops with multiple live out values, as measured from
the LCSSA phi nodes.

Differential Revision: https://reviews.llvm.org/D104659
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was addedllvm/test/Transforms/LoopUnroll/ARM/v6munroll.ll
Commit 656001e7b2b939d9bce4fb58831d314dc67ddf7a by spatel
[ValueTracking] look through bitcast of vector in computeKnownBits

This borrows as much as possible from the SDAG version of the code
(originally added with D27129 and since updated with big endian support).

In IR, we can test more easily for correctness than we did in the
original patch. I'm using the simplest cases that I could find for
InstSimplify: we computeKnownBits on variable shift amounts to see if
they are zero or in range. So shuffle constant elements into a vector,
cast it, and shift it.

The motivating x86 example from https://llvm.org/PR50123 is also here.
We computeKnownBits in the caller code, but we only check if the shift
amount is in range. That could be enhanced to catch the 2nd x86 test -
if the shift amount is known too big, the result is 0.

Alive2 understands the datalayout and agrees that the tests here are
correct - example:
https://alive2.llvm.org/ce/z/KZJFMZ

Differential Revision: https://reviews.llvm.org/D104472
The file was modifiedllvm/test/Transforms/InstCombine/X86/x86-vector-shifts.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/shift-knownbits.ll
Commit be9a87fe9bc395074c383c07fbd9c0bce953985f by vlovich
[clang-format] Add IfMacros option

https://bugs.llvm.org/show_bug.cgi?id=49354

Differential Revision: https://reviews.llvm.org/D102730
The file was modifiedclang/lib/Format/FormatToken.h
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
The file was modifiedclang/lib/Format/FormatTokenLexer.cpp
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/include/clang/Format/Format.h
Commit b58dfd87da5cb19693764869a9a158f88c3d4bde by gcmn
Update Bazel BUILD files up to be9a87fe9b

Differential Revision: https://reviews.llvm.org/D104791
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Commit 6cc6ada143236f16faf8b383d73e00e709fa6a9f by tomasz.miasko
[Demangle][Rust] Hide implementation details NFC

Move content of the "public" header into the implementation file.

This also renames two enumerations that were previously used through
`rust_demangle::` scope, to avoid breaking a build bot with older
version of GCC that rejects uses of enumerator through `E::A` if there
is a variable with the same name as enumeration `E` in the scope.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D104362
The file was removedllvm/include/llvm/Demangle/RustDemangle.h
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
Commit 00d3f7cc3c264adc360d0282ba8a27de2a004b94 by nikita.ppv
[LAA] Make getPointersDiff() API compatible with opaque pointers

Make getPointersDiff() and sortPtrAccesses() compatible with opaque
pointers by explicitly passing in the element type instead of
determining it from the pointer element type.

The SLPVectorizer result is slightly non-optimal in that unnecessary
pointer bitcasts are added.

Differential Revision: https://reviews.llvm.org/D104784
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
The file was addedllvm/test/Transforms/SLPVectorizer/X86/opaque-ptr.ll
The file was modifiedllvm/include/llvm/Analysis/LoopAccessAnalysis.h
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 2fd3037ac615643fe8058292d2b89bb19a49cb2f by aqjune
[ConstantFold] Allow propagation of poison for and/or i1

They were disallowed due to its bad interaction with select i1 -> and/or i1.
The transformation is now disabled by D101191, so let's revive this.
The file was modifiedllvm/lib/IR/ConstantFold.cpp
Commit 560170fa2de5ed3d8720bf6a88c7652ceb47ff8c by zoecarver
[libcxx][views] Add drop_view.

The first view in the libc++ ranges library 🚀

Differential Revision: https://reviews.llvm.org/D102037
The file was modifiedlibcxx/include/CMakeLists.txt
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/ctor.view.pass.cpp
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/end.pass.cpp
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/ctor.default.pass.cpp
The file was modifiedlibcxx/include/ranges
The file was addedlibcxx/include/__ranges/drop_view.h
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/types.h
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/base.pass.cpp
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/size.pass.cpp
The file was addedlibcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp
Commit 45d5373511711c7876e884e9460f99f904b5d0e3 by llvmgnsyncbot
[gn build] Port 560170fa2de5
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit 5616a79398c7f10d92daf7d6387b195e95f2ac7e by gh
[MLIR][LLVM] Expose type translator from LLVM to MLIR Type

This commit moves the type translator from LLVM to MLIR to a public header for use by external projects or other code

Differential Revision: https://reviews.llvm.org/D104726
The file was modifiedmlir/lib/Target/LLVMIR/TypeTranslation.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
The file was modifiedmlir/include/mlir/Target/LLVMIR/TypeTranslation.h
Commit 71f6f7e00a5946871c1390f4d29998d25ccf0d59 by gh
Revert "[MLIR][LLVM] Expose type translator from LLVM to MLIR Type"

This reverts commit 5616a79398c7f10d92daf7d6387b195e95f2ac7e.
The file was modifiedmlir/include/mlir/Target/LLVMIR/TypeTranslation.h
The file was modifiedmlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
The file was modifiedmlir/lib/Target/LLVMIR/TypeTranslation.cpp
Commit 5d44d56f7deb086ac91664fbd053d703cefd3da9 by kuterdinel
[Attributor] Derive AAFunctionReachability attribute.

This attribute uses Attributor's internal 'optimistic' call graph
information to answer queries about function call reachability.

Functions can become reachable over time as new call edges are
discovered.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D104599
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/unittests/Transforms/IPO/AttributorTest.cpp
Commit 072f5180f2d33a3323a164fe19a7a477e93073a9 by Adrian Prantl
Improve error handling in llvm-dwarfdump.

Without this patch we're only showing a generic error message derived
from the error code to the end user.

rdar://79378794

Differential Revision: https://reviews.llvm.org/D104483
The file was modifiedllvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
The file was addedllvm/test/tools/llvm-dwarfdump/X86/lc_malformed.test
Commit 7b81fdf984ddc298ae2a1f672b64926e30946c3c by Adrian Prantl
clang-format llvm-dwarfdump.cpp
The file was modifiedllvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
Commit ec08f03be3942d4ae6694d0f7a9b490fe3cbba9b by zequanwu
[OpaquePtr] Mangle intrinsics with opaque pointers arguments

Mangling intrinsics with opaque pointer arguments using "op"+{address space}.

Differential Revision: https://reviews.llvm.org/D104272
The file was modifiedllvm/lib/IR/Function.cpp
The file was modifiedllvm/test/Verifier/opaque-ptr.ll
Commit e3d24b45b8f808ec66213e134c4ceda5202fbe31 by samitolvanen
ThinLTO: Fix inline assembly references to static functions with CFI

Create an internal alias with the original name for static functions
that are renamed in promoteInternals to avoid breaking inline
assembly references to them.

This relands commit 4474958d3a97dede2caa0920f7c4a4dc7aac57d3
with a fix to a use-of-uninitialized-value error that tripped
MemorySanitizer.

Link: https://github.com/ClangBuiltLinux/linux/issues/1354

Reviewed By: nickdesaulniers, pcc

Differential Revision: https://reviews.llvm.org/D104058
The file was addedllvm/test/Transforms/ThinLTOBitcodeWriter/cfi-icall-static-inline-asm.ll
The file was modifiedllvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
Commit f660af46e3df342245b6a0aacd8989c5a2212552 by nikita.ppv
[OpaquePtr] Support call instruction

Add support for call of opaque pointer, currently only possible for
indirect calls.

This requires a bit of special casing in LLParser, as calls do not
specify the callee operand type explicitly.

Differential Revision: https://reviews.llvm.org/D104740
The file was modifiedllvm/lib/Bitcode/Writer/ValueEnumerator.cpp
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/test/Assembler/opaque-ptr.ll
Commit 00c93d8801f13058a4cd9b70a2747b5a9908e2a4 by riddleriver
Fix flang build after D104167
The file was modifiedflang/include/flang/Optimizer/Dialect/FIROps.td
The file was modifiedflang/lib/Optimizer/Dialect/FIROps.cpp
Commit 56709b869570f7825d335d633bc829511980c253 by Cyndy Ishida
[TextAPI] add symbol name prefixes to central location, NFC

These prefixes are used for printing the symbols coming from tbd files
and they were redundant across locations
The file was modifiedllvm/lib/Object/TapiFile.cpp
The file was modifiedllvm/tools/llvm-tapi-diff/DiffEngine.cpp
The file was modifiedllvm/tools/llvm-tapi-diff/DiffEngine.h
The file was modifiedllvm/include/llvm/TextAPI/Symbol.h
Commit e5f2b035dd8ff5cce3e12d5ab7e478f7e66b9117 by nikita.ppv
[OpaquePtr] Support invoke instruction

With call support in place, this is only a matter of relaxing a
bitcode reader assertion.
The file was modifiedllvm/test/Assembler/opaque-ptr.ll
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
Commit dbbc8d8333f29cf4ad6f4793da1adf71bbfdac69 by thakis
[lld/mac] Don't crash on absolute symbols in unwind info generation

Fixes a regression from d6565a2dbcbe and PR50820.
The file was modifiedlld/test/MachO/compact-unwind.s
The file was modifiedlld/MachO/UnwindInfoSection.cpp
Commit 8321335fd8ae9110f4faaabce6ef62c28b8f16cf by nikita.ppv
[InstCombine] Use getFunctionType()

Avoid fetching pointer element type...
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/opaque-ptr.ll
Commit fb9f9497dc013a0e8d41d24748fc142cb6f4081a by Cyndy Ishida
[llvm-tapi-diff] Wrap empty string around StringLiteral NFC

This prevents invalid implicit conversation which caused buildbot
failure.
The file was modifiedllvm/tools/llvm-tapi-diff/DiffEngine.cpp
Commit b06fbdeae752e59cdf36a1cd26be8a6dcd51e862 by leonardchan
[compiler-rt][hwasan] Add InitState options to thread initialization

Similar to InitOptions in asan, we can use this optional struct for
initializing some members thread objects before they are created. On
linux, this is unused and can remain undefined. On fuchsia, this will
just be the stack bounds.

Differential Revision: https://reviews.llvm.org/D104553
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread_list.h
The file was modifiedcompiler-rt/lib/hwasan/hwasan_linux.cpp
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread.h
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread.cpp
Commit 5076d27ff01913a280e8ca8b40d38fb11fe7113d by Adrian Prantl
Update test after https://reviews.llvm.org/D104483
The file was modifiedllvm/test/DebugInfo/dwarfdump-invalid.test
Commit f086ef3e83fd466fef2fbd1f9184d540675db0f6 by nikita.ppv
[Constants] Handle addrspacecast with opaque pointer type

This is the same change as D104668, but for constant expression
addrspacecasts.
The file was modifiedllvm/lib/IR/Constants.cpp
The file was modifiedllvm/test/Transforms/InstCombine/opaque-ptr.ll
Commit 7a38a757a16830c25c1402258682c0d18290d84d by Adrian Prantl
Move dwarfdump-invalid.test into the tools/llvm-dwarfdump directory.
The file was addedllvm/test/tools/llvm-dwarfdump/X86/Inputs/invalid.elf.2
The file was removedllvm/test/DebugInfo/Inputs/invalid.elf.3
The file was removedllvm/test/DebugInfo/Inputs/invalid.elf.2
The file was addedllvm/test/tools/llvm-dwarfdump/X86/Inputs/invalid.elf.3
The file was removedllvm/test/DebugInfo/dwarfdump-invalid.test
The file was removedllvm/test/DebugInfo/Inputs/invalid.elf
The file was addedllvm/test/tools/llvm-dwarfdump/X86/Inputs/invalid.elf
The file was addedllvm/test/tools/llvm-dwarfdump/X86/dwarfdump-invalid.test
Commit 0eac975b51cca5b54a1f516d05a233c215375eda by caij2003
Reland "[AArch64] handle -Wa,-march="

This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931, which was
reverted by 9145a3d4ab7eb05d9fb113b5392e8961df629b88 due to a test
failure on aarch64 backend, e.g.
https://lab.llvm.org/buildbot/#/builders/43/builds/7031. This patch
fixed the test failure.

Reviewed By: DavidSpickett, nickdesaulniers

Differential Revision: https://reviews.llvm.org/D103184
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.h
The file was addedclang/test/Driver/aarch64-target-as-march.s
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 3cf415c6c367ced43175ebd1dc4bd9582c7f5376 by Duncan P. N. Exon Smith
IR: Fix use-list-order round-tripping for call and invoke

Fix the use-list-order for call and invoke instructions by setting the
operands in order of their index. This matches the use-list-order
prediction. Note that the verifier precludes sharing operands in callbr
(so there was no bug to fix), but that code was updated for consistency.

Bug was found during review of https://reviews.llvm.org/D104740.

Differential Revision: https://reviews.llvm.org/D104805
The file was modifiedllvm/lib/IR/Instructions.cpp
The file was addedllvm/test/Assembler/call-arg-is-callee.ll
Commit a15f9ff996eafdc125402d5a40c8af5cd59a0f6a by pyadav2299
[docs][GISel]Added GISel documentation link

Added the GISel docs link here - https://llvm.org/docs/CodeGenerator.html#instruction-selection-section

Differential Revision: https://reviews.llvm.org/D104204
The file was modifiedllvm/docs/CodeGenerator.rst
Commit d274d64ef45f99387428d80a4f4b81dee91305e8 by Stanislav.Mekhanoshin
[AMDGPU] Check for pointer operand while refining LDS align

Also skips the propagation if alignment is 1.

Differential Revision: https://reviews.llvm.org/D104796
The file was modifiedllvm/test/CodeGen/AMDGPU/lower-kernel-lds-super-align.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
Commit 9e73f7c8d2d75433348ff41ea3dcc8d0a7501184 by andrew.litteken
[IRSim] Adding basic implementation of llvm-sim.

This is a similarity visualization tool that accepts a Module and
passes it to the IRSimilarityIdentifier.  The resulting SimilarityGroups
are output in a JSON file.

Tests are found in test/tools/llvm-sim and check for the file not found,
a bad module, and that the JSON is created correctly.

Reviewers: paquette, jroelofs, MaskRay

Recommit of: 15645d044bcfe2a0f63156048b302f997a717688 to fix linking
errors and GN build system.

Differential Revision: https://reviews.llvm.org/D86974
The file was addedllvm/tools/llvm-sim/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/llvm/test/BUILD.gn
The file was addedllvm/test/tools/llvm-sim/single-sim-file.test
The file was addedllvm/test/tools/llvm-sim/single-sim.test
The file was modifiedllvm/test/lit.cfg.py
The file was addedllvm/tools/llvm-sim/llvm-sim.cpp
The file was addedllvm/test/tools/llvm-sim/Inputs/sim1.ll
The file was addedllvm/test/tools/llvm-sim/fail-cases.test
The file was addedllvm/utils/gn/secondary/llvm/tools/llvm-sim/BUILD.gn
The file was modifiedllvm/test/CMakeLists.txt
Commit fdaf304e0d984c9f919c6b6b2b108d0d31cbea87 by efriedma
[NFC][ScalarEvolution] Fix SCEVNAryExpr::getType().

SCEVNAryExpr::getType() could return the wrong type for a SCEVAddExpr.
Remove it, and add getType() methods to the relevant subclasses.

NFC because nothing uses it directly, as far as I know; this is just
future-proofing.
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit b12192f7cd8c12898c161c573aad41ac65721c80 by efriedma
[ScalarEvolution] Clarify implementation of getPointerBase().

getPointerBase should only be looking through Add and AddRec
expressions; other expressions either aren't pointers, or can't be
looked through.

Technically, this is a functional change. For a multiply or min/max
expression, if they have exactly one pointer operand, and that operand
is the first operand, the behavior here changes. Similarly, if an AddRec
has a pointer-type step, the behavior changes. But that shouldn't be
happening in practice, and we plan to make such expressions illegal.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 84046ebd9543d60832d9a580bcbe2e3e5acc3217 by llvm-project
[Polly] Fix test after D104732.

The SCEV analysis has been improved to identify a write access as a MustWrite.
The file was modifiedpolly/test/ScopInfo/fortran_array_param_nonmalloc_nonvectored.ll
Commit 2716c6faa46f346b66fe7af5219d611b369d42e9 by martin
[flang] Tweak the conditions for the GCC 7/libstdc++ workaround

This adjusts the workaround from D104731.

The issue lies in libstdc++'s classes, not GCC itself, and manifests
itself in the same way if building e.g. with clang while using
libstdc++ headers from GCC 7 (e.g. if building with Clang on Ubuntu 18.04,
while using the system default C++ library).

Therefore, change the condition to look for the version of libstdc++
instead of the compiler.

Differential Revision: https://reviews.llvm.org/D104779
The file was modifiedflang/include/flang/Evaluate/type.h