llvm-project/llvm/lib
Sanjay Patel 24226504a7 [SimplifyCFG] try harder to forward switch condition to phi (PR34471)
The missed canonicalization/optimization in the motivating test from PR34471 leads to very different codegen:

  int switcher(int x) {
      switch(x) {
      case 17: return 17;
      case 19: return 19;
      case 42: return 42;
      default: break;
      }
      return 0;
    }

  int comparator(int x) {
    if (x == 17) return 17;
    if (x == 19) return 19;
    if (x == 42) return 42;
    return 0;
  }

For the first example, we use a bit-test optimization to avoid a series of compare-and-branch:
https://godbolt.org/g/BivDsw

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

llvm-svn: 316293
2017-10-22 16:51:03 +00:00
..
Analysis [ValueTracking] Remove unnecessary temporary APInt from computeNumSignBitsVectorConstant. 2017-10-21 16:35:41 +00:00
AsmParser Fix assembler for alloca of multiple elements in non-zero addr space 2017-10-14 03:23:18 +00:00
BinaryFormat Simplify. 2017-10-19 01:32:18 +00:00
Bitcode Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
CodeGen [SelectionDAG] Use dyn_cast without cast. 2017-10-21 05:37:10 +00:00
DebugInfo COFF: Add type server pdb files to linkrepro tar file. 2017-10-20 19:48:26 +00:00
Demangle [ItaniumDemangle] Fix a exponential string copying bug 2017-05-28 23:24:52 +00:00
ExecutionEngine [mips] Adds support for R_MIPS_26, HIGHER, HIGHEST relocations in RuntimeDyld. 2017-10-22 09:47:41 +00:00
FuzzMutate FuzzMutate: Fix arch parsing in FuzzerCLI 2017-10-17 02:39:40 +00:00
Fuzzer [libFuzzer] Delete llvm/lib/Fuzzer 2017-10-16 20:48:19 +00:00
IR Verifier: Ignore CUs pulled in by ODR-uniqued types. 2017-10-18 01:11:01 +00:00
IRReader Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
LTO Convert the last uses of ErrorOr in include/llvm/Object. 2017-10-11 18:07:18 +00:00
LineEditor
Linker Linker: Create a function declaration when moving a non-prevailing alias of function type. 2017-08-10 01:07:44 +00:00
MC [WebAssembly] MC: Fix crash when -g specified. 2017-10-20 21:28:38 +00:00
Object Untabify. 2017-10-18 13:31:28 +00:00
ObjectYAML AMDGPU: Add and set AMDGPU-specific e_flags 2017-10-05 16:19:18 +00:00
Option Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
Passes Rename OptimizationDiagnosticInfo.* to OptimizationRemarkEmitter.* 2017-10-09 23:19:02 +00:00
ProfileData [Coverage] Simplify r316141. NFC. 2017-10-19 06:16:23 +00:00
Support Revert rL316156 due to failure on APFloatTest.fromToStringSpecials 2017-10-19 12:22:39 +00:00
TableGen Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
Target [ARM] Dynamic stack alignment for 16-bit Thumb 2017-10-22 11:56:35 +00:00
Testing Mark LLVMTestingSupport as not installed in LLVMBuild. 2017-06-19 22:01:50 +00:00
ToolDrivers Convert the archive writer to use Error. 2017-09-21 23:13:36 +00:00
Transforms [SimplifyCFG] try harder to forward switch condition to phi (PR34471) 2017-10-22 16:51:03 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
XRay [XRay][tools] Support arg1 logging entries in the basic logging mode 2017-10-05 05:18:17 +00:00
CMakeLists.txt Moving libFuzzer from LLVM to compiler-rt. 2017-08-21 23:25:12 +00:00
LLVMBuild.txt Re-apply "Introduce FuzzMutate library" 2017-08-21 22:57:06 +00:00