SuccessChanges

Summary

  1. [ARM] Add patterns for vmulh (details)
  2. [NFC][object] Change the input parameter of the method isDebugSection. (details)
  3. [mlir] Fold complex.re(complex.create) and complex.im(complex.create) (details)
  4. [InstCombine] Fold extractelement + vector GEP with one use (details)
  5. [mlir] Simplify folding code (NFC) (details)
  6. [mlir] LocalAliasAnalysis: Assume allocation scope to function scope if cannot determine better (details)
  7. [HIP] Adjust check in hip-include-path.hip test case (details)
Commit 2cf0e52b8548716d8534470db1ce4bbb3571eea9 by david.green
[ARM] Add patterns for vmulh

Now that vmulh can be selected, this adds the MVE patterns to make it
legal and generate instructions.

Differential Revision: https://reviews.llvm.org/D88011
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmulh.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/unittests/Target/ARM/MachineInstrTest.cpp
The file was modifiedllvm/lib/Target/ARM/ARMInstrMVE.td
Commit bf809cd165f4ea1b8ef6aabc8e41e29747b4d2c7 by esme.yi
[NFC][object] Change the input parameter of the method isDebugSection.

Summary: This is a NFC patch to change the input parameter of the method SectionRef::isDebugSection(), by replacing the StringRef SectionName with DataRefImpl Sec. This allows us to determine if a section is debug type in more ways than just by section name.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D102601
The file was modifiedllvm/lib/Object/COFFObjectFile.cpp
The file was modifiedllvm/include/llvm/Object/ELFObjectFile.h
The file was modifiedllvm/include/llvm/Object/MachO.h
The file was modifiedllvm/lib/Object/ObjectFile.cpp
The file was modifiedllvm/lib/Object/MachOObjectFile.cpp
The file was modifiedllvm/include/llvm/Object/COFF.h
The file was modifiedllvm/tools/llvm-dwarfdump/SectionSizes.cpp
The file was modifiedllvm/include/llvm/Object/ObjectFile.h
Commit b99f892b025b553680c7e5dbcf15ab7301e3fa57 by akuegel
[mlir] Fold complex.re(complex.create) and complex.im(complex.create)

This extends the folding we already have. A test needs to be adjusted.

Differential Revision: https://reviews.llvm.org/D103141
The file was modifiedmlir/test/Conversion/ComplexToLLVM/convert-to-llvm.mlir
The file was modifiedmlir/test/Dialect/Complex/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Complex/IR/ComplexOps.cpp
Commit 9c766f4090d19e3e2f56e87164177f8c3eba4b96 by david.sherwood
[InstCombine] Fold extractelement + vector GEP with one use

We sometimes see code like this:

Case 1:
  %gep = getelementptr i32, i32* %a, <2 x i64> %splat
  %ext = extractelement <2 x i32*> %gep, i32 0

or this:

Case 2:
  %gep = getelementptr i32, <4 x i32*> %a, i64 1
  %ext = extractelement <4 x i32*> %gep, i32 0

where there is only one use of the GEP. In such cases it makes
sense to fold the two together such that we create a scalar GEP:

Case 1:
  %ext = extractelement <2 x i64> %splat, i32 0
  %gep = getelementptr i32, i32* %a, i64 %ext

Case 2:
  %ext = extractelement <2 x i32*> %a, i32 0
  %gep = getelementptr i32, i32* %ext, i64 1

This may create further folding opportunities as a result, i.e.
the extract of a splat vector can be completely eliminated. Also,
even for the general case where the vector operand is not a splat
it seems beneficial to create a scalar GEP and extract the scalar
element from the operand. Therefore, in this patch I've assumed
that a scalar GEP is always preferrable to a vector GEP and have
added code to unconditionally fold the extract + GEP.

I haven't added folds for the case when we have both a vector of
pointers and a vector of indices, since this would require
generating an additional extractelement operation.

Tests have been added here:

  Transforms/InstCombine/gep-vector-indices.ll

Differential Revision: https://reviews.llvm.org/D101900
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
The file was modifiedllvm/test/Transforms/InstCombine/vec_gep_scalar_arg.ll
The file was modifiedllvm/test/Transforms/InstCombine/vec_gep_scalar_arg-inseltpoison.ll
The file was addedllvm/test/Transforms/InstCombine/gep-vector-indices.ll
The file was modifiedllvm/test/Transforms/InstCombine/vec_demanded_elts-inseltpoison.ll
The file was modifiedllvm/test/Transforms/InstCombine/vec_demanded_elts.ll
Commit cb65419b1ac05c3020dd05b64db183712235d2ff by akuegel
[mlir] Simplify folding code (NFC)
The file was modifiedmlir/lib/Dialect/Complex/IR/ComplexOps.cpp
Commit 91e0cb6598f458c79707bc3481f0e70b1dd731d4 by ivan.butygin
[mlir] LocalAliasAnalysis: Assume allocation scope to function scope if cannot determine better

It helps when checking aliasing between AllocOp result and function arguments.

Differential Revision: https://reviews.llvm.org/D102557
The file was modifiedmlir/test/Analysis/test-alias-analysis.mlir
The file was modifiedmlir/lib/Analysis/AliasAnalysis/LocalAliasAnalysis.cpp
Commit a3b3f7e631981bd861d5fe5e20f33b11a0dac978 by bjorn.a.pettersson
[HIP] Adjust check in hip-include-path.hip test case

The changes in commit 722c39fef5ab6 caused the test case to fail
when building with -DLLVM_LIBDIR_SUFFIX=64. This patch makes the
checks a bit more relaxed to support libdir suffixes again.

Also adjusting the regular expressions to avoid mathes including
double quotes.
The file was modifiedclang/test/Driver/hip-include-path.hip