FailedChanges

Summary

  1. [X86] Avoid SFB - Skip meta instructions This patch generalizes the fix in D61680 to ignore all meta instructions, not just debug info. Patch by Chris Dawson. Differential Revision: https://reviews.llvm.org/D62605
  2. [Bitcode] Update CHECK-DAG usage in tests This patch adjusts tests not to depend on deprecated FileCheck behavior that permits overlapping matches within a block of `CHECK-DAG` directives: 1. `thinlto-function-summary-originalnames.ll`: The directive with the pattern `<COMBINED` is surely intended to match `<COMBINED ` (note the trailing space), but it instead matches `<COMBINED_GLOBALVAR_INIT_REFS`, for which there is a separate directive. With the deprecated behavior, both directives match the latter text and neither match the former text. I've adjusted the former directive so it matches only the former text. 2. `thinlto-summary-local-5.0.ll`: Two directives have identical patterns when they were clearly meant to have different patterns. 3. `upgrade-pointer-address-space.ll`: There are three identical directives but only two occurrences of the matching text. With the deprecated behavior, they always match exactly the same text, so the behavior can't have been useful. I removed one of the directives and converted the other two from `CHECK-DAG` to `CHECK`. Reviewed By: probinson, aprantl Differential Revision: https://reviews.llvm.org/D64036
  3. [CodeGen] Make branch funnels pass the machine verifier We previously marked all the tests with branch funnels as `-verify-machineinstrs=0`. This is an attempt to fix it. 1) `ICALL_BRANCH_FUNNEL` has no defs. Mark it as `let OutOperandList = (outs)` 2) After that we hit an assert: ``` Assertion failed: (Op.getValueType() != MVT::Other && Op.getValueType() != MVT::Glue && "Chain and glue operands should occur at end of operand list!"), function AddOperand, file /Users/francisvm/llvm/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp, line 461. ``` The chain operand was added at the beginning of the operand list. Move that to the end. 3) After that we hit another verifier issue in the pseudo expansion where the registers used in the cmps and jmps are not added to the livein lists. Add the `EFLAGS` to all the new MBBs that we create. PR39436 Differential Review: https://reviews.llvm.org/D54155
  4. [X86] ComputeNumSignBitsForTargetNode - add target shuffle support.
  5. [NFC][InstCombine] onehot_merge.ll: add last few tests in the state they regress to in D62818
  6. [SLP] add tests for bitcasted vector pointer load; NFC I'm not sure if this falls within the scope of SLP, but we could create vector loads for some of these patterns.
  7. Use getAllOnesConstants instead of -1 in DAGCombiner. NFC
  8. [SCEV] Preserve flags on add/muls in getSCEVATScope We haven't changed the set of users, just specialized an operand for those users. Given that, the previous wrap flags must still be correct. Sorry for the lack of test case. Noticed this while working on something else, and haven't figured out to exercise this standalone.
  9. [scudo][standalone] Link tests against libatomic Summary: Some clang versions (< 6.0) do not inline the atomic builtin functions leaving unresolved references to `__atomic_load_8` and so on (seems to be mostly 64-bit atomics on 32-bit platforms). I tried without success to use some cmake magic to detect when that would be the case, and decided to fall back to unconditionally linking libatomic. Reviewers: morehouse, eugenis, vitalybuka, hctim, tejohnson Reviewed By: tejohnson Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D64134
  10. [DAGCombine] More diamong carry pattern optimization. Summary: This diff improve the capability of DAGCOmbine to generate linear carries propagation in presence of a diamond pattern. It is now able to match a large variety of different patterns rather than some hardcoded one. Arguably, the codegen in test cases is not better, but this is to be expected. The goal of this transformation is more about canonicalisation than actual optimisation. Reviewers: hfinkel, RKSimon, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D57302
  11. [X86][AVX] combineX86ShufflesRecursively - peek through extract_subvector If we have more then 2 shuffle ops to combine, try to use combineX86ShuffleChainWithExtract to see if some are from the same super vector.
  12. [ELF][RISCV] Error on R_RISCV_PCREL_LO12_[IS] that point to absolute symbols The referenced symbol is expected to point to an R_RISCV_*_HI20 relocation. An absolute symbol has no associated section, therefore there cannot be a matching R_RISCV_*_HI20. This fixes the crash reported by PR42038. For reference, ld.bfd errors: (.init+0x4): dangerous relocation: %pcrel_lo missing matching %pcrel_hi Differential Revision: https://reviews.llvm.org/D63273
  13. Revert D63432 "[ELF] Allow placing SHF_MERGE sections with different alignments into the same MergeSyntheticSection" This reverts r365015. David Zarzycki reported this change broke stage2 and stage3 tests. The root cause is still not very clear, but I guess some SHF_MERGE sections with the same name have different alignments. They were not merged before but were merged after r365015. Something that assumes address uniqueness of such mergeable data caused the bug.
  14. [ThinLTO] Fix gcc warnings from commit Remove an unnecessary const from an Optional return type introduced in r364960 that gcc 7.4.0 warns about. It is unnecessary and possibly incorrect.
Revision 365061 by rlougher:
[X86] Avoid SFB - Skip meta instructions

This patch generalizes the fix in D61680 to ignore all meta instructions,
not just debug info.

Patch by Chris Dawson.

Differential Revision: https://reviews.llvm.org/D62605
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (diff)llvm.src/include/llvm/CodeGen/MachineBasicBlock.h
The file was modified/llvm/trunk/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp (diff)llvm.src/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
The file was added/llvm/trunk/test/CodeGen/X86/avoid-sfb-ignore-meta.mirllvm.src/test/CodeGen/X86/avoid-sfb-ignore-meta.mir
Revision 365060 by jdenny:
[Bitcode] Update CHECK-DAG usage in tests

This patch adjusts tests not to depend on deprecated FileCheck
behavior that permits overlapping matches within a block of
`CHECK-DAG` directives:

1. `thinlto-function-summary-originalnames.ll`: The directive with the
pattern `<COMBINED` is surely intended to match `<COMBINED ` (note the
trailing space), but it instead matches
`<COMBINED_GLOBALVAR_INIT_REFS`, for which there is a separate
directive.  With the deprecated behavior, both directives match the
latter text and neither match the former text.  I've adjusted the
former directive so it matches only the former text.

2. `thinlto-summary-local-5.0.ll`: Two directives have identical
patterns when they were clearly meant to have different patterns.

3. `upgrade-pointer-address-space.ll`: There are three identical
directives but only two occurrences of the matching text.  With the
deprecated behavior, they always match exactly the same text, so the
behavior can't have been useful.  I removed one of the directives and
converted the other two from `CHECK-DAG` to `CHECK`.

Reviewed By: probinson, aprantl

Differential Revision: https://reviews.llvm.org/D64036
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Bitcode/thinlto-function-summary-originalnames.ll (diff)llvm.src/test/Bitcode/thinlto-function-summary-originalnames.ll
The file was modified/llvm/trunk/test/Bitcode/thinlto-summary-local-5.0.ll (diff)llvm.src/test/Bitcode/thinlto-summary-local-5.0.ll
The file was modified/llvm/trunk/test/Bitcode/upgrade-pointer-address-space.ll (diff)llvm.src/test/Bitcode/upgrade-pointer-address-space.ll
Revision 365058 by thegameg:
[CodeGen] Make branch funnels pass the machine verifier

We previously marked all the tests with branch funnels as
`-verify-machineinstrs=0`.

This is an attempt to fix it.

1) `ICALL_BRANCH_FUNNEL` has no defs. Mark it as `let OutOperandList =
(outs)`

2) After that we hit an assert: ``` Assertion failed: (Op.getValueType()
!= MVT::Other && Op.getValueType() != MVT::Glue && "Chain and glue
operands should occur at end of operand list!"), function AddOperand,
file
/Users/francisvm/llvm/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp,
line 461.  ```

The chain operand was added at the beginning of the operand list. Move
that to the end.

3) After that we hit another verifier issue in the pseudo expansion
where the registers used in the cmps and jmps are not added to the
livein lists. Add the `EFLAGS` to all the new MBBs that we create.

PR39436

Differential Review: https://reviews.llvm.org/D54155
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Target/Target.td (diff)llvm.src/include/llvm/Target/Target.td
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modified/llvm/trunk/lib/Target/X86/X86ExpandPseudo.cpp (diff)llvm.src/lib/Target/X86/X86ExpandPseudo.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/icall-branch-funnel.ll (diff)llvm.src/test/CodeGen/X86/icall-branch-funnel.ll
The file was modified/llvm/trunk/test/ThinLTO/X86/cfi-devirt.ll (diff)llvm.src/test/ThinLTO/X86/cfi-devirt.ll
The file was modified/llvm/trunk/test/ThinLTO/X86/devirt-after-icp.ll (diff)llvm.src/test/ThinLTO/X86/devirt-after-icp.ll
Revision 365057 by rksimon:
[X86] ComputeNumSignBitsForTargetNode - add target shuffle support.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (diff)llvm.src/lib/Target/X86/X86ISelLowering.cpp
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.ll (diff)llvm.src/test/CodeGen/X86/vector-reduce-smin.ll
Revision 365056 by lebedevri:
[NFC][InstCombine] onehot_merge.ll: add last few tests in the state they regress to in D62818
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/InstCombine/onehot_merge.ll (diff)llvm.src/test/Transforms/InstCombine/onehot_merge.ll
Revision 365055 by spatel:
[SLP] add tests for bitcasted vector pointer load; NFC

I'm not sure if this falls within the scope of SLP,
but we could create vector loads for some of these
patterns.
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/Transforms/SLPVectorizer/X86/load-bitcast-vec.llllvm.src/test/Transforms/SLPVectorizer/X86/load-bitcast-vec.ll
Revision 365054 by deadalnix:
Use getAllOnesConstants instead of -1 in DAGCombiner. NFC
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Revision 365053 by reames:
[SCEV] Preserve flags on add/muls in getSCEVATScope

We haven't changed the set of users, just specialized an operand for those users.  Given that, the previous wrap flags must still be correct.

Sorry for the lack of test case.  Noticed this while working on something else, and haven't figured out to exercise this standalone.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Analysis/ScalarEvolution.cpp (diff)llvm.src/lib/Analysis/ScalarEvolution.cpp
Revision 365052 by cryptoad:
[scudo][standalone] Link tests against libatomic

Summary:
Some clang versions (< 6.0) do not inline the atomic builtin functions
leaving unresolved references to `__atomic_load_8` and so on (seems to
be mostly 64-bit atomics on 32-bit platforms).
I tried without success to use some cmake magic to detect when that
would be the case, and decided to fall back to unconditionally
linking libatomic.

Reviewers: morehouse, eugenis, vitalybuka, hctim, tejohnson

Reviewed By: tejohnson

Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D64134
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/scudo/standalone/tests/CMakeLists.txt (diff)compiler-rt.src/lib/scudo/standalone/tests/CMakeLists.txt
Revision 365051 by deadalnix:
[DAGCombine] More diamong carry pattern optimization.

Summary:
This diff improve the capability of DAGCOmbine to generate linear carries propagation in presence of a diamond pattern. It is now able to match a large variety of different patterns rather than some hardcoded one.

Arguably, the codegen in test cases is not better, but this is to be expected. The goal of this transformation is more about canonicalisation than actual optimisation.

Reviewers: hfinkel, RKSimon, craig.topper

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D57302
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/addcarry.ll (diff)llvm.src/test/CodeGen/X86/addcarry.ll
The file was modified/llvm/trunk/test/CodeGen/X86/subcarry.ll (diff)llvm.src/test/CodeGen/X86/subcarry.ll
Revision 365050 by rksimon:
[X86][AVX] combineX86ShufflesRecursively - peek through extract_subvector

If we have more then 2 shuffle ops to combine, try to use combineX86ShuffleChainWithExtract to see if some are from the same super vector.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (diff)llvm.src/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/pr29112.ll (diff)llvm.src/test/CodeGen/X86/pr29112.ll
The file was modified/llvm/trunk/test/CodeGen/X86/shuffle-vs-trunc-512-widen.ll (diff)llvm.src/test/CodeGen/X86/shuffle-vs-trunc-512-widen.ll
The file was modified/llvm/trunk/test/CodeGen/X86/shuffle-vs-trunc-512.ll (diff)llvm.src/test/CodeGen/X86/shuffle-vs-trunc-512.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vector-shuffle-512-v16.ll (diff)llvm.src/test/CodeGen/X86/vector-shuffle-512-v16.ll
Revision 365049 by maskray:
[ELF][RISCV] Error on R_RISCV_PCREL_LO12_[IS] that point to absolute symbols

The referenced symbol is expected to point to an R_RISCV_*_HI20
relocation. An absolute symbol has no associated section, therefore
there cannot be a matching R_RISCV_*_HI20.

This fixes the crash reported by PR42038. For reference, ld.bfd errors:

    (.init+0x4): dangerous relocation: %pcrel_lo missing matching %pcrel_hi

Differential Revision: https://reviews.llvm.org/D63273
Change TypePath in RepositoryPath in Workspace
The file was modified/lld/trunk/ELF/InputSection.cpp (diff)lld.src/ELF/InputSection.cpp
The file was added/lld/trunk/test/ELF/riscv-pcrel-hilo-error.slld.src/test/ELF/riscv-pcrel-hilo-error.s
Revision 365048 by maskray:
Revert D63432 "[ELF] Allow placing SHF_MERGE sections with different alignments into the same MergeSyntheticSection"

This reverts r365015.

David Zarzycki reported this change broke stage2 and stage3 tests.  The
root cause is still not very clear, but I guess some SHF_MERGE sections
with the same name have different alignments. They were not merged
before but were merged after r365015.

Something that assumes address uniqueness of such mergeable data caused
the bug.
Change TypePath in RepositoryPath in Workspace
The file was modified/lld/trunk/ELF/SyntheticSections.cpp (diff)lld.src/ELF/SyntheticSections.cpp
The file was removed/lld/trunk/test/ELF/merge-align2.slld.src/test/ELF/merge-align2.s
The file was removed/lld/trunk/test/ELF/merge-entsize2.slld.src/test/ELF/merge-entsize2.s
The file was added/lld/trunk/test/ELF/merge-reloc-O0.slld.src/test/ELF/merge-reloc-O0.s
Revision 365047 by tejohnson:
[ThinLTO] Fix gcc warnings from commit

Remove an unnecessary const from an Optional return type introduced
in r364960 that gcc 7.4.0 warns about. It is unnecessary and possibly
incorrect.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h (diff)llvm.src/include/llvm/IR/ModuleSummaryIndex.h