AbortedChanges

Summary

  1. [TargetLowering] SimplifyMultipleUseDemandedBits - add VECTOR_SHUFFLE support. If all the demanded elts are from one operand and are inline, then we can use the operand directly. The changes are mainly from SSE41 targets which has blendvpd but not cmpgtq, allowing the v2i64 comparison to be simplified as we only need the signbit from alternate v4i32 elements.
  2. Revert "[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections()." This reverts commit r366796 because it was causing ubsan buildbot failures.
  3. [llvm-ar] Fix support for archives with members larger than 4GB llvm-ar outputs a strange error message when handling archives with members larger than 4GB due to not checking file size when passing the value as an unsigned 32 bit integer. This overflow issue caused malformed archives to be created.: https://bugs.llvm.org/show_bug.cgi?id=38058 This change allows for members above 4GB and will error in a case that is over the formats size limit, a 10 digit decimal integer. Differential Revision: https://reviews.llvm.org/D65093
  4. [clangd] Log version, cwd, args, and transport on startup. NFC Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65146
  5. [ARM][LowOverheadLoops] Fix branch target codegen While lowering test.set.loop.iterations, it wasn't checked how the brcond was using the result and so the wls could branch to the loop preheader instead of not entering it. The same was true for loop.decrement.reg. So brcond and br_cc and now lowered manually when using the hwloop intrinsics. During this we now check whether the result has been negated and whether we're using SETEQ or SETNE and 0 or 1. We can then figure out which basic block the WLS and LE should be targeting. Differential Revision: https://reviews.llvm.org/D64616
  6. Fix MSVC warning about extending a uint32_t shift result to uint64_t. NFCI.
  7. [SLPVectorizer] Revert local change that got accidently got committed in rL366799 This wasn't part of D63281
  8. Revert [RISCV] Re-enable rv32i-aliases-invalid.s test This reverts r366797 (git commit 53f9fec8e8b58f5a904bbfb4a1d648cde65aa860)
  9. [NFC][ASAN] Add brackets around not command Under certain execution conditions, the `not` command binds to the command the output is piped to rather than the command piping the output. In this case, that flips the return code of the FileCheck invocation, causing a failure when FileCheck succeeds.
  10. [NFC][InstCombine] Fixup commutative/negative tests with icmp preds in @llvm.umul.with.overflow tests
  11. [InstSimplify][NFC] Tests for skipping 'div-by-0' checks before inverted @llvm.umul.with.overflow It would be already handled by the non-inverted case if we were hoisting the `not` in InstCombine, but we don't (granted, we don't sink it in this case either), so this is a separate case.
  12. [NFC][PhaseOredering][SimplifyCFG] Add more runlines to umul.with.overflow tests This way it will be more obvious that the problem is both in cost threshold and in hardcoded benefit check, plus will show how the instsimplify cleans this all in the end.
  13. [TargetLowering] Add SimplifyMultipleUseDemandedBits This patch introduces the DAG version of SimplifyMultipleUseDemandedBits, which attempts to peek through ops (mainly and/or/xor so far) that don't contribute to the demandedbits/elts of a node - which means we can do this even in cases where we have multiple uses of an op, which normally requires us to demanded all bits/elts. The intention is to remove a similar instruction - SelectionDAG::GetDemandedBits - once SimplifyMultipleUseDemandedBits has matured. The InstCombine version of SimplifyMultipleUseDemandedBits can constant fold which I haven't added here yet, and so far I've only wired this up to some basic binops (and/or/xor/add/sub/mul) to demonstrate its use. We do see a couple of regressions that need to be addressed: AMDGPU unsigned dot product codegen retains an AND mask (for ZERO_EXTEND) that it previously removed (but otherwise the dotproduct codegen is a lot better). X86/AVX2 has poor handling of vector ANY_EXTEND/ANY_EXTEND_VECTOR_INREG - it prematurely gets converted to ZERO_EXTEND_VECTOR_INREG. The code owners have confirmed its ok for these cases to fixed up in future patches. Differential Revision: https://reviews.llvm.org/D63281
  14. [RISCV] Re-enable rv32i-aliases-invalid.s test We were getting test failures on some builders, which pointed to @LINE being an undefined variable. I think that these failures should have been fixed by https://reviews.llvm.org/rL366434, so I'm re-enabling the test.
  15. [Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections(). This eliminates a one error untested and also introduces a error for one more possible case which lead to crash previously. Differential revision: https://reviews.llvm.org/D64987
Revision 366817 by rksimon:
[TargetLowering] SimplifyMultipleUseDemandedBits - add VECTOR_SHUFFLE support.

If all the demanded elts are from one operand and are inline, then we can use the operand directly.

The changes are mainly from SSE41 targets which has blendvpd but not cmpgtq, allowing the v2i64 comparison to be simplified as we only need the signbit from alternate v4i32 elements.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/midpoint-int-vec-128.ll (diff)llvm.src/test/CodeGen/X86/midpoint-int-vec-128.ll
The file was modified/llvm/trunk/test/CodeGen/X86/psubus.ll (diff)llvm.src/test/CodeGen/X86/psubus.ll
The file was modified/llvm/trunk/test/CodeGen/X86/sat-add.ll (diff)llvm.src/test/CodeGen/X86/sat-add.ll
The file was modified/llvm/trunk/test/CodeGen/X86/uadd_sat_vec.ll (diff)llvm.src/test/CodeGen/X86/uadd_sat_vec.ll
The file was modified/llvm/trunk/test/CodeGen/X86/usub_sat_vec.ll (diff)llvm.src/test/CodeGen/X86/usub_sat_vec.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vec_minmax_sint.ll (diff)llvm.src/test/CodeGen/X86/vec_minmax_sint.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vec_minmax_uint.ll (diff)llvm.src/test/CodeGen/X86/vec_minmax_uint.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-fshl-rot-512.ll (diff)llvm.src/test/CodeGen/X86/vector-fshl-rot-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-fshr-rot-512.ll (diff)llvm.src/test/CodeGen/X86/vector-fshr-rot-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-smax-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-smax-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-smax.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-smax.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-smin-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-smin-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-smin.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-smin.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-umax-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-umax-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-umax.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-umax.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-umin-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-umin-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-umin.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-umin.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-packus-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-packus-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-packus.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-packus.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-ssat-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-ssat-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-ssat.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-ssat.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-usat-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-usat-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-trunc-usat.ll (diff)llvm.src/test/CodeGen/X86/vector-trunc-usat.ll
Revision 366815 by vlad.tsyrklevich:
Revert "[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections()."

This reverts commit r366796 because it was causing ubsan buildbot
failures.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Object/ELF.h (diff)llvm.src/include/llvm/Object/ELF.h
The file was modified/llvm/trunk/include/llvm/ObjectYAML/ELFYAML.h (diff)llvm.src/include/llvm/ObjectYAML/ELFYAML.h
The file was modified/llvm/trunk/test/Object/invalid.test (diff)llvm.src/test/Object/invalid.test
The file was modified/llvm/trunk/tools/yaml2obj/yaml2elf.cpp (diff)llvm.src/tools/yaml2obj/yaml2elf.cpp
Revision 366813 by gbreynoo:
[llvm-ar] Fix support for archives with members larger than 4GB

llvm-ar outputs a strange error message when handling archives with
members larger than 4GB due to not checking file size when passing the
value as an unsigned 32 bit integer. This overflow issue caused
malformed archives to be created.:

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

This change allows for members above 4GB and will error in a case that
is over the formats size limit, a 10 digit decimal integer.

Differential Revision: https://reviews.llvm.org/D65093
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Object/Archive.h (diff)llvm.src/include/llvm/Object/Archive.h
The file was modified/llvm/trunk/lib/Object/Archive.cpp (diff)llvm.src/lib/Object/Archive.cpp
The file was modified/llvm/trunk/lib/Object/ArchiveWriter.cpp (diff)llvm.src/lib/Object/ArchiveWriter.cpp
Revision 366811 by sammccall:
[clangd] Log version, cwd, args, and transport on startup. NFC

Reviewers: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65146
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp (diff)clang-tools-extra.src/clangd/tool/ClangdMain.cpp
Revision 366809 by sam_parker:
[ARM][LowOverheadLoops] Fix branch target codegen
   
While lowering test.set.loop.iterations, it wasn't checked how the
brcond was using the result and so the wls could branch to the loop
preheader instead of not entering it. The same was true for
loop.decrement.reg.
   
So brcond and br_cc and now lowered manually when using the hwloop
intrinsics. During this we now check whether the result has been
negated and whether we're using SETEQ or SETNE and 0 or 1. We can
then figure out which basic block the WLS and LE should be targeting.

Differential Revision: https://reviews.llvm.org/D64616
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (diff)llvm.src/lib/Target/ARM/ARMISelDAGToDAG.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (diff)llvm.src/lib/Target/ARM/ARMISelLowering.cpp
The file was modified/llvm/trunk/lib/Target/ARM/ARMISelLowering.h (diff)llvm.src/lib/Target/ARM/ARMISelLowering.h
The file was modified/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (diff)llvm.src/lib/Target/ARM/ARMInstrInfo.td
The file was added/llvm/trunk/test/CodeGen/Thumb2/LowOverheadLoops/branch-targets.llllvm.src/test/CodeGen/Thumb2/LowOverheadLoops/branch-targets.ll
Revision 366808 by rksimon:
Fix MSVC warning about extending a uint32_t shift result to uint64_t. NFCI.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/AMDGPU/AMDGPUISelLowering.cpp (diff)llvm.src/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Revision 366807 by rksimon:
[SLPVectorizer] Revert local change that got accidently got committed in rL366799

This wasn't part of D63281
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (diff)llvm.src/lib/Transforms/Vectorize/SLPVectorizer.cpp
Revision 366806 by lenary:
Revert [RISCV] Re-enable rv32i-aliases-invalid.s test

This reverts r366797 (git commit 53f9fec8e8b58f5a904bbfb4a1d648cde65aa860)
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/MC/RISCV/rv32i-aliases-invalid.s (diff)llvm.src/test/MC/RISCV/rv32i-aliases-invalid.s
Revision 366805 by lei:
[NFC][ASAN] Add brackets around not command

Under certain execution conditions, the `not` command binds to the command the
output is piped to rather than the command piping the output. In this case, that
flips the return code of the FileCheck invocation, causing a failure when
FileCheck succeeds.
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/test/asan/TestCases/Linux/read_binary_name_regtest.c (diff)compiler-rt.src/test/asan/TestCases/Linux/read_binary_name_regtest.c
Revision 366802 by lebedevri:
[NFC][InstCombine] Fixup commutative/negative tests with icmp preds in @llvm.umul.with.overflow tests
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/InstCombine/unsigned-mul-lack-of-overflow-check-via-udiv-of-allones.ll (diff)llvm.src/test/Transforms/InstCombine/unsigned-mul-lack-of-overflow-check-via-udiv-of-allones.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/unsigned-mul-overflow-check-via-udiv-of-allones.ll (diff)llvm.src/test/Transforms/InstCombine/unsigned-mul-overflow-check-via-udiv-of-allones.ll
Revision 366801 by lebedevri:
[InstSimplify][NFC] Tests for skipping 'div-by-0' checks before inverted @llvm.umul.with.overflow

It would be already handled by the non-inverted case if we were hoisting
the `not` in InstCombine, but we don't (granted, we don't sink it
in this case either), so this is a separate case.
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/Transforms/InstSimplify/div-by-0-guard-before-smul_ov-not.llllvm.src/test/Transforms/InstSimplify/div-by-0-guard-before-smul_ov-not.ll
The file was added/llvm/trunk/test/Transforms/InstSimplify/div-by-0-guard-before-umul_ov-not.llllvm.src/test/Transforms/InstSimplify/div-by-0-guard-before-umul_ov-not.ll
Revision 366800 by lebedevri:
[NFC][PhaseOredering][SimplifyCFG] Add more runlines to umul.with.overflow tests

This way it will be more obvious that the problem is both
in cost threshold and in hardcoded benefit check,
plus will show how the instsimplify cleans this all in the end.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/PhaseOrdering/unsigned-multiply-overflow-check.ll (diff)llvm.src/test/Transforms/PhaseOrdering/unsigned-multiply-overflow-check.ll
The file was modified/llvm/trunk/test/Transforms/SimplifyCFG/unsigned-multiplication-will-overflow.ll (diff)llvm.src/test/Transforms/SimplifyCFG/unsigned-multiplication-will-overflow.ll
Revision 366799 by rksimon:
[TargetLowering] Add SimplifyMultipleUseDemandedBits

This patch introduces the DAG version of SimplifyMultipleUseDemandedBits, which attempts to peek through ops (mainly and/or/xor so far) that don't contribute to the demandedbits/elts of a node - which means we can do this even in cases where we have multiple uses of an op, which normally requires us to demanded all bits/elts. The intention is to remove a similar instruction - SelectionDAG::GetDemandedBits - once SimplifyMultipleUseDemandedBits has matured.

The InstCombine version of SimplifyMultipleUseDemandedBits can constant fold which I haven't added here yet, and so far I've only wired this up to some basic binops (and/or/xor/add/sub/mul) to demonstrate its use.

We do see a couple of regressions that need to be addressed:

    AMDGPU unsigned dot product codegen retains an AND mask (for ZERO_EXTEND) that it previously removed (but otherwise the dotproduct codegen is a lot better).

    X86/AVX2 has poor handling of vector ANY_EXTEND/ANY_EXTEND_VECTOR_INREG - it prematurely gets converted to ZERO_EXTEND_VECTOR_INREG.

The code owners have confirmed its ok for these cases to fixed up in future patches.

Differential Revision: https://reviews.llvm.org/D63281
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/TargetLowering.h (diff)llvm.src/include/llvm/CodeGen/TargetLowering.h
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modified/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (diff)llvm.src/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modified/llvm/trunk/test/CodeGen/AArch64/bitfield-insert.ll (diff)llvm.src/test/CodeGen/AArch64/bitfield-insert.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot4s.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot4s.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot4u.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot4u.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot8s.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot8s.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/idot8u.ll (diff)llvm.src/test/CodeGen/AMDGPU/idot8u.ll
The file was modified/llvm/trunk/test/CodeGen/AMDGPU/sdiv.ll (diff)llvm.src/test/CodeGen/AMDGPU/sdiv.ll
The file was modified/llvm/trunk/test/CodeGen/SystemZ/store_nonbytesized_vecs.ll (diff)llvm.src/test/CodeGen/SystemZ/store_nonbytesized_vecs.ll
The file was modified/llvm/trunk/test/CodeGen/X86/2012-08-07-CmpISelBug.ll (diff)llvm.src/test/CodeGen/X86/2012-08-07-CmpISelBug.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-fshl-128.ll (diff)llvm.src/test/CodeGen/X86/vector-fshl-128.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-mul-widen.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-mul-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-reduce-mul.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-mul.ll
Revision 366797 by lenary:
[RISCV] Re-enable rv32i-aliases-invalid.s test

We were getting test failures on some builders, which pointed to @LINE
being an undefined variable. I think that these failures should have
been fixed by https://reviews.llvm.org/rL366434, so I'm re-enabling the
test.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/MC/RISCV/rv32i-aliases-invalid.s (diff)llvm.src/test/MC/RISCV/rv32i-aliases-invalid.s
Revision 366796 by grimar:
[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections().

This eliminates a one error untested and
also introduces a error for one more possible case
which lead to crash previously.

Differential revision: https://reviews.llvm.org/D64987
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Object/ELF.h (diff)llvm.src/include/llvm/Object/ELF.h
The file was modified/llvm/trunk/include/llvm/ObjectYAML/ELFYAML.h (diff)llvm.src/include/llvm/ObjectYAML/ELFYAML.h
The file was modified/llvm/trunk/test/Object/invalid.test (diff)llvm.src/test/Object/invalid.test
The file was modified/llvm/trunk/tools/yaml2obj/yaml2elf.cpp (diff)llvm.src/tools/yaml2obj/yaml2elf.cpp