llvm-project/llvm/test
Sanjay Patel 40a87a909b [InstCombine] remove fold that swaps xor/or with constants; NFCI
// (X ^ C1) | C2 --> (X | C2) ^ (C1&~C2)

This canonicalization was added at:
https://reviews.llvm.org/rL7264 

By moving xors out/down, we can more easily combine constants. I'm adding
tests that do not change with this patch, so we can verify that those kinds
of transforms are still happening.

This is no-functional-change-intended because there's a later fold:
// (X^C)|Y -> (X|Y)^C iff Y&C == 0
...and demanded-bits appears to guarantee that any fold that would have
hit the fold we're removing here would be caught by that 2nd fold.

Similar reasoning was used in:
https://reviews.llvm.org/rL299384

The larger motivation for removing this code is that it could interfere with 
the fix for PR32706:
https://bugs.llvm.org/show_bug.cgi?id=32706

Ie, we're not checking if the 'xor' is actually a 'not', so we could reverse
a 'not' optimization and cause an infinite loop by altering an 'xor X, -1'. 

Differential Revision: https://reviews.llvm.org/D33050

llvm-svn: 302733
2017-05-10 21:33:55 +00:00
..
Analysis AMDGPU: Make some packed shuffles free 2017-05-10 21:29:33 +00:00
Assembler Support arbitrary address space pointers in masked gather/scatter intrinsics. 2017-05-03 12:28:54 +00:00
Bindings
Bitcode AMDGPU: Add AMDGPU_HS calling convention 2017-05-02 15:41:10 +00:00
BugPoint llvm/test/BugPoint/compile-custom.ll: Use %/s for its path not to be mis-escaped. 2017-04-13 11:40:32 +00:00
CodeGen [SDAG] Relax conditions under stores of loaded values can be merged 2017-05-10 19:53:41 +00:00
DebugInfo [codeview] Check for a DIExpression offset for local variables 2017-05-09 19:59:29 +00:00
Examples
ExecutionEngine
Feature Replace hardcoded intrinsic list with speculatable attribute. 2017-05-03 02:26:10 +00:00
FileCheck
Instrumentation [asan] Fix dead stripping of globals on Linux. 2017-04-27 20:27:27 +00:00
Integer
JitListener
LTO LTO: Mark undefined module asm symbols as used. 2017-04-26 17:53:39 +00:00
LibDriver
Linker Remap metadata attached to global variables. 2017-05-04 23:29:39 +00:00
MC [SystemZ] Add miscellaneous instructions 2017-05-10 14:20:15 +00:00
Object [llvm-readobj] Improve errors on invalid binary 2017-05-10 14:18:11 +00:00
ObjectYAML [WebAssembly] Improve libObject support for wasm imports and exports 2017-05-09 23:48:41 +00:00
Other [PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline. 2017-05-04 16:58:45 +00:00
SymbolRewriter
TableGen [globalisel][tablegen] Fix the test after silencing the unused variable warning in r301755. 2017-04-29 19:46:27 +00:00
ThinLTO/X86 Remove line and file from DINamespace. 2017-04-28 22:25:46 +00:00
Transforms [InstCombine] remove fold that swaps xor/or with constants; NFCI 2017-05-10 21:33:55 +00:00
Unit [Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows. 2017-05-08 08:55:38 +00:00
Verifier Make it illegal for two Functions to point to the same DISubprogram 2017-05-09 19:47:37 +00:00
YAMLParser
tools [llvm-readobj] Improve errors on invalid binary 2017-05-10 14:18:11 +00:00
.clang-format
CMakeLists.txt Add a dependency from llvm/test to llvm-cvtres. 2017-04-21 20:45:11 +00:00
TestRunner.sh
lit.cfg
lit.site.cfg.in