llvm-project/llvm/test
Sanjay Patel d802270808 [InstSimplify] fold select with implied condition
This is an almost direct move of the functionality from InstCombine to 
InstSimplify. There's no reason not to do this in InstSimplify because 
we never create a new value with this transform.

(There's a question of whether any dominance-based transform belongs in
either of these passes, but that's a separate issue.)

I've changed 1 of the conditions for the fold (1 of the blocks for the 
branch must be the block we started with) into an assert because I'm not 
sure how that could ever be false.

We need 1 extra check to make sure that the instruction itself is in a
basic block because passes other than InstCombine may be using InstSimplify
as an analysis on values that are not wired up yet.

The 3-way compare changes show that InstCombine has some kind of 
phase-ordering hole. Otherwise, we would have already gotten the intended
final result that we now show here.

llvm-svn: 347896
2018-11-29 18:44:39 +00:00
..
Analysis [X86] Make X86TTIImpl::getCastInstrCost properly handle the case where AVX512 is enabled, but 512-bit vectors aren't legal. 2018-11-28 18:11:42 +00:00
Assembler [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
Bindings [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
Bitcode [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
BugPoint
CodeGen [GlobalISel] LegalizationArtifactCombiner: Combine aext([asz]ext x) -> [asz]ext x 2018-11-29 18:19:24 +00:00
DebugInfo [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
Demangle [MS Demangler] Print public:, protected:, private: if set in FunctionClass or a variable's StorageClass. 2018-11-13 20:18:26 +00:00
Examples
ExecutionEngine [ExecutionEngine][Interpreter] Fix out-of-bounds array access. 2018-11-20 01:01:26 +00:00
Feature Mark @llvm.trap cold 2018-11-14 19:53:41 +00:00
FileCheck [FileCheck] introduce CHECK-COUNT-<num> repetition directive 2018-11-13 00:46:13 +00:00
Instrumentation [sancov] Put .SCOV* sections into the right comdat groups on COFF 2018-11-08 00:57:33 +00:00
Integer
JitListener
LTO [LTO] Load sample profile in LTO link step. 2018-11-15 18:06:42 +00:00
Linker [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
MC [RISCV] Support .option push and .option pop 2018-11-28 16:39:14 +00:00
Object AMDGPU: Enable code object v3 for AMDHSA only 2018-11-15 02:32:43 +00:00
ObjectYAML [WebAssembly] Add support for dylink section in object format 2018-11-14 18:36:24 +00:00
Other Print newline after banner for ModulePass 2018-11-14 10:05:28 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [TableGen] Examine entire subreg compositions to detect ambiguity 2018-11-29 18:20:08 +00:00
ThinLTO/X86 [ThinLTO] Import local variables from the same module as caller 2018-11-29 17:02:42 +00:00
Transforms [InstSimplify] fold select with implied condition 2018-11-29 18:44:39 +00:00
Unit
Verifier [IRVerifier] Allow StructRet in statepoint 2018-11-16 14:28:05 +00:00
YAMLParser
tools [llvm-rc] Support EXSTYLE statement. 2018-11-29 12:17:39 +00:00
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg.py
lit.site.cfg.py.in