FailedChanges

Summary

  1. [InstCombine] don't use DeMorgan's Law on integer constants This is the fold that causes the infinite loop in BoringSSL (https://github.com/google/boringssl/blob/master/crypto/cipher/e_rc2.c) when we fix instcombine demanded bits to prefer 'not' ops as in D32255. There are 2 or 3 problems with dyn_castNotVal, and I don't think we can reinstate D32255 until dyn_castNotVal is completely eliminated. 1. As shown here, it transforms 'not' into random xor. This transform is harmful to SCEV and codegen because 'not' can often be folded while random xor cannot. 2. It does not transform vector constants. This is actually a good thing, but if you don't believe the above argument, then we shouldn't have excluded vectors. 3. It tries to avoid transforming not(not(X)). That's nice, but it doesn't match the greedy nature of instcombine. If we DeMorganize a pattern that has an extra 'not' in it: ~(~(~X) & Y) --> (~X | ~Y) That's just another case of DeMorgan, so we should trust that we'll fold that pattern too: (~X | ~ Y) --> ~(X & Y) Differential Revision: https://reviews.llvm.org/D32665
  2. [DAGCombine] (uaddo X, (addcarry Y, 0, Carry)) -> (addcarry X, Y, Carry) Summary: This is a common pattern that arise when legalizing large integers operations. Only do it when Y + 1 cannot overflow as this would change the carry behavior of uaddo . Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32687
  3. Add llvm::object::getELFSectionTypeName(). This is motivated by https://reviews.llvm.org/D32488 where I am trying to add printing of the section type for incompatible sections to LLD error messages. This patch allows us to use the same code in llvm-readobj and LLD instead of duplicating the function inside LLD. Patch by Alexander Richardson!
  4. Improvements to TableGen/LangIntro.rst Document the 'code' data type, and that value{15-17} is different to value{17-15}. Patch by @chenwj (Wei-Ren Chen). Differential Revision: https://reviews.llvm.org/D32117
Revision 301923 by spatel:
[InstCombine] don't use DeMorgan's Law on integer constants

This is the fold that causes the infinite loop in BoringSSL
(https://github.com/google/boringssl/blob/master/crypto/cipher/e_rc2.c)
when we fix instcombine demanded bits to prefer 'not' ops as in D32255.

There are 2 or 3 problems with dyn_castNotVal, and I don't think we can
reinstate D32255 until dyn_castNotVal is completely eliminated.
1. As shown here, it transforms 'not' into random xor. This transform is
   harmful to SCEV and codegen because 'not' can often be folded while
   random xor cannot.
2. It does not transform vector constants. This is actually a good thing,
   but if you don't believe the above argument, then we shouldn't have
   excluded vectors.
3. It tries to avoid transforming not(not(X)). That's nice, but it doesn't
   match the greedy nature of instcombine. If we DeMorganize a pattern
   that has an extra 'not' in it:
   ~(~(~X) & Y) --> (~X | ~Y)

   That's just another case of DeMorgan, so we should trust that we'll fold
   that pattern too:
   (~X | ~ Y) --> ~(X & Y)

Differential Revision: https://reviews.llvm.org/D32665
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (diff)llvm-revision.src/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/assume2.ll (diff)llvm-revision.src/llvm/trunk/test/Transforms/InstCombine/assume2.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/demorgan.ll (diff)llvm-revision.src/llvm/trunk/test/Transforms/InstCombine/demorgan.ll
Revision 301922 by deadalnix:
[DAGCombine] (uaddo X, (addcarry Y, 0, Carry)) -> (addcarry X, Y, Carry)

Summary: This is a common pattern that arise when legalizing large integers operations. Only do it when Y + 1 cannot overflow as this would change the carry behavior of uaddo .

Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32687
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (diff)llvm-revision.src/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/adde-carry.ll (diff)llvm-revision.src/llvm/trunk/test/CodeGen/X86/adde-carry.ll
The file was modified/llvm/trunk/test/CodeGen/X86/mul-i1024.ll (diff)llvm-revision.src/llvm/trunk/test/CodeGen/X86/mul-i1024.ll
The file was modified/llvm/trunk/test/CodeGen/X86/mul-i256.ll (diff)llvm-revision.src/llvm/trunk/test/CodeGen/X86/mul-i256.ll
The file was modified/llvm/trunk/test/CodeGen/X86/mul-i512.ll (diff)llvm-revision.src/llvm/trunk/test/CodeGen/X86/mul-i512.ll
Revision 301921 by rafael:
Add llvm::object::getELFSectionTypeName().

This is motivated by https://reviews.llvm.org/D32488 where I am trying
to add printing of the section type for incompatible sections to LLD
error messages. This patch allows us to use the same code in
llvm-readobj and LLD instead of duplicating the function inside LLD.

Patch by Alexander Richardson!
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Object/ELF.h (diff)llvm-revision.src/llvm/trunk/include/llvm/Object/ELF.h
The file was modified/llvm/trunk/lib/Object/ELF.cpp (diff)llvm-revision.src/llvm/trunk/lib/Object/ELF.cpp
The file was modified/llvm/trunk/test/MC/ELF/section-numeric-invalid-type.s (diff)llvm-revision.src/llvm/trunk/test/MC/ELF/section-numeric-invalid-type.s
The file was modified/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (diff)llvm-revision.src/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Revision 301920 by asb:
Improvements to TableGen/LangIntro.rst

Document the 'code' data type, and that value{15-17} is different to
value{17-15}.

Patch by @chenwj (Wei-Ren Chen).

Differential Revision: https://reviews.llvm.org/D32117
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/docs/TableGen/LangIntro.rst (diff)llvm-revision.src/llvm/trunk/docs/TableGen/LangIntro.rst