mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-13 06:25:02 +00:00
e27db74a60
comparisons formed by comparisons. For example, this: void foo(unsigned x) { if (x == 0 || x == 1 || x == 3 || x == 4 || x == 6) bar(); } compiles into: _foo: ## @foo ## BB#0: ## %entry cmpl $6, %edi ja LBB0_2 ## BB#1: ## %entry movl %edi, %eax movl $91, %ecx btq %rax, %rcx jb LBB0_3 instead of: _foo: ## @foo ## BB#0: ## %entry cmpl $2, %edi jb LBB0_4 ## BB#1: ## %switch.early.test cmpl $6, %edi ja LBB0_3 ## BB#2: ## %switch.early.test movl %edi, %eax movl $88, %ecx btq %rax, %rcx jb LBB0_4 This catches a bunch of cases in GCC, which look like this: %804 = load i32* @which_alternative, align 4, !tbaa !0 %805 = icmp ult i32 %804, 2 %806 = icmp eq i32 %804, 3 %or.cond121 = or i1 %805, %806 %807 = icmp eq i32 %804, 4 %or.cond124 = or i1 %or.cond121, %807 br i1 %or.cond124, label %.thread, label %808 turning this into a range comparison. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122045 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
ADT | ||
Analysis | ||
Assembly | ||
Bitcode | ||
CodeGen | ||
CompilerDriver | ||
Config | ||
ExecutionEngine | ||
MC | ||
Object | ||
Support | ||
Target | ||
Transforms | ||
AbstractTypeUser.h | ||
Argument.h | ||
Attributes.h | ||
AutoUpgrade.h | ||
BasicBlock.h | ||
CallGraphSCCPass.h | ||
CallingConv.h | ||
CMakeLists.txt | ||
Constant.h | ||
Constants.h | ||
DerivedTypes.h | ||
Function.h | ||
GlobalAlias.h | ||
GlobalValue.h | ||
GlobalVariable.h | ||
GVMaterializer.h | ||
InitializePasses.h | ||
InlineAsm.h | ||
InstrTypes.h | ||
Instruction.def | ||
Instruction.h | ||
Instructions.h | ||
IntrinsicInst.h | ||
Intrinsics.h | ||
Intrinsics.td | ||
IntrinsicsAlpha.td | ||
IntrinsicsARM.td | ||
IntrinsicsCellSPU.td | ||
IntrinsicsPowerPC.td | ||
IntrinsicsX86.td | ||
IntrinsicsXCore.td | ||
LinkAllPasses.h | ||
LinkAllVMCore.h | ||
Linker.h | ||
LLVMContext.h | ||
Metadata.h | ||
Module.h | ||
OperandTraits.h | ||
Operator.h | ||
Pass.h | ||
PassAnalysisSupport.h | ||
PassManager.h | ||
PassManagers.h | ||
PassRegistry.h | ||
PassSupport.h | ||
SymbolTableListTraits.h | ||
Type.h | ||
TypeSymbolTable.h | ||
Use.h | ||
User.h | ||
Value.h | ||
ValueSymbolTable.h |