/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAndOrXor.cpp | 872 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHS->getOperand(1)); in foldAndOrOfICmpsOfAndWithPow2() local 874 if (!LHSC || !RHSC || !LHSC->isZero() || !RHSC->isZero()) in foldAndOrOfICmpsOfAndWithPow2() 1200 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHS->getOperand(1)); in foldAndOfICmps() local 1202 if (!LHSC || !RHSC) in foldAndOfICmps() 1205 if (LHSC == RHSC && PredL == PredR) { in foldAndOfICmps() 1209 if ((PredL == ICmpInst::ICMP_ULT && LHSC->getValue().isPowerOf2()) || in foldAndOfICmps() 1210 (PredL == ICmpInst::ICMP_EQ && LHSC->isZero())) { in foldAndOfICmps() 1212 return Builder.CreateICmp(PredL, NewOr, LHSC); in foldAndOfICmps() 1229 BigC = LHSC; in foldAndOfICmps() 1232 SmallC = LHSC; in foldAndOfICmps() [all …]
|
D | InstCombineCompares.cpp | 5026 const APInt *LHSC; in foldICmpUsingKnownBits() local 5027 if (!match(Op0, m_And(m_Value(LHS), m_APInt(LHSC))) || in foldICmpUsingKnownBits() 5028 *LHSC != Op0KnownZeroInverted) in foldICmpUsingKnownBits()
|
/external/llvm-project/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAndOrXor.cpp | 1187 ConstantInt *LHSC, *RHSC; in foldAndOfICmps() local 1188 if (!match(LHS->getOperand(1), m_ConstantInt(LHSC)) || in foldAndOfICmps() 1192 if (LHSC == RHSC && PredL == PredR) { in foldAndOfICmps() 1196 if ((PredL == ICmpInst::ICMP_ULT && LHSC->getValue().isPowerOf2()) || in foldAndOfICmps() 1197 (PredL == ICmpInst::ICMP_EQ && LHSC->isZero())) { in foldAndOfICmps() 1199 return Builder.CreateICmp(PredL, NewOr, LHSC); in foldAndOfICmps() 1216 BigC = LHSC; in foldAndOfICmps() 1219 SmallC = LHSC; in foldAndOfICmps() 1259 ShouldSwap = LHSC->getValue().sgt(RHSC->getValue()); in foldAndOfICmps() 1261 ShouldSwap = LHSC->getValue().ugt(RHSC->getValue()); in foldAndOfICmps() [all …]
|
D | InstCombineCompares.cpp | 5091 const APInt *LHSC; in foldICmpUsingKnownBits() local 5092 if (!match(Op0, m_And(m_Value(LHS), m_APInt(LHSC))) || in foldICmpUsingKnownBits() 5093 *LHSC != Op0KnownZeroInverted) in foldICmpUsingKnownBits()
|
/external/llvm-project/llvm/test/Transforms/InstCombine/ |
D | bcmp-1.ll | 38 ; CHECK-NEXT: [[LHSC:%.*]] = load i8, i8* [[MEM1:%.*]], align 1 39 ; CHECK-NEXT: [[LHSV:%.*]] = zext i8 [[LHSC]] to i32
|
D | strncmp-1.ll | 78 ; CHECK-NEXT: [[LHSC:%.*]] = load i8, i8* [[STR1:%.*]], align 1 79 ; CHECK-NEXT: [[LHSV:%.*]] = zext i8 [[LHSC]] to i32
|
D | memcmp-1.ll | 38 ; CHECK-NEXT: [[LHSC:%.*]] = load i8, i8* %mem1, align 1 39 ; CHECK-NEXT: [[LHSV:%.*]] = zext i8 [[LHSC]] to i32
|
D | and-or-icmps.ll | 40 ; if LHSC and RHSC differ only by one bit:
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCompares.cpp | 2127 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHSI->getOperand(0)); in visitICmpInstWithInstAndIntCst() local 2128 if (!LHSC) break; in visitICmpInstWithInstAndIntCst() 2129 const APInt &LHSV = LHSC->getValue(); in visitICmpInstWithInstAndIntCst() 2138 LHSC); in visitICmpInstWithInstAndIntCst() 2146 Builder->CreateOr(LHSI->getOperand(1), RHSV), LHSC); in visitICmpInstWithInstAndIntCst() 2153 ConstantInt *LHSC = dyn_cast<ConstantInt>(LHSI->getOperand(1)); in visitICmpInstWithInstAndIntCst() local 2154 if (!LHSC) break; in visitICmpInstWithInstAndIntCst() 2155 const APInt &LHSV = LHSC->getValue(); in visitICmpInstWithInstAndIntCst() 2185 ConstantExpr::getNeg(LHSC)); in visitICmpInstWithInstAndIntCst() 2194 ConstantExpr::getNeg(LHSC)); in visitICmpInstWithInstAndIntCst() [all …]
|
D | InstCombineAndOrXor.cpp | 1128 if (ConstantFP *LHSC = dyn_cast<ConstantFP>(LHS->getOperand(1))) in FoldAndOfFCmps() local 1132 if (LHSC->getValueAPF().isNaN() || RHSC->getValueAPF().isNaN()) in FoldAndOfFCmps() 2037 if (ConstantFP *LHSC = dyn_cast<ConstantFP>(LHS->getOperand(1))) in FoldOrOfFCmps() local 2041 if (LHSC->getValueAPF().isNaN() || RHSC->getValueAPF().isNaN()) in FoldOrOfFCmps()
|
/external/llvm/lib/Analysis/ |
D | ScalarEvolution.cpp | 2042 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getAddExpr() local 2047 Ops[0] = getConstant(LHSC->getAPInt() + RHSC->getAPInt()); in getAddExpr() 2050 LHSC = cast<SCEVConstant>(Ops[0]); in getAddExpr() 2054 if (LHSC->getValue()->isZero()) { in getAddExpr() 2453 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getMulExpr() local 2462 return getAddExpr(getMulExpr(LHSC, Add->getOperand(0)), in getMulExpr() 2463 getMulExpr(LHSC, Add->getOperand(1))); in getMulExpr() 2469 ConstantInt::get(getContext(), LHSC->getAPInt() * RHSC->getAPInt()); in getMulExpr() 2473 LHSC = cast<SCEVConstant>(Ops[0]); in getMulExpr() 2769 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(LHS)) { in getUDivExpr() local [all …]
|
/external/llvm-project/llvm/lib/Analysis/ |
D | ScalarEvolution.cpp | 2296 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getAddExpr() local 2301 Ops[0] = getConstant(LHSC->getAPInt() + RHSC->getAPInt()); in getAddExpr() 2304 LHSC = cast<SCEVConstant>(Ops[0]); in getAddExpr() 2308 if (LHSC->getValue()->isZero()) { in getAddExpr() 2814 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getMulExpr() local 2819 Ops[0] = getConstant(LHSC->getAPInt() * RHSC->getAPInt()); in getMulExpr() 2822 LHSC = cast<SCEVConstant>(Ops[0]); in getMulExpr() 2826 if (LHSC->getValue()->isZero()) in getMulExpr() 2827 return LHSC; in getMulExpr() 2830 if (LHSC->getValue()->isOne()) { in getMulExpr() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/ |
D | ScalarEvolution.cpp | 2434 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getAddExpr() local 2439 Ops[0] = getConstant(LHSC->getAPInt() + RHSC->getAPInt()); in getAddExpr() 2442 LHSC = cast<SCEVConstant>(Ops[0]); in getAddExpr() 2446 if (LHSC->getValue()->isZero()) { in getAddExpr() 2939 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getMulExpr() local 2951 return getAddExpr(getMulExpr(LHSC, Add->getOperand(0), in getMulExpr() 2953 getMulExpr(LHSC, Add->getOperand(1), in getMulExpr() 2961 ConstantInt::get(getContext(), LHSC->getAPInt() * RHSC->getAPInt()); in getMulExpr() 2965 LHSC = cast<SCEVConstant>(Ops[0]); in getMulExpr() 3304 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(LHS)) { in getUDivExpr() local [all …]
|
/external/llvm-project/llvm/lib/Transforms/Utils/ |
D | SimplifyLibCalls.cpp | 999 if (auto *LHSC = dyn_cast<Constant>(LHS)) { in optimizeMemCmpConstantSize() local 1000 LHSC = ConstantExpr::getBitCast(LHSC, IntType->getPointerTo()); in optimizeMemCmpConstantSize() 1001 LHSV = ConstantFoldLoadFromConstPtr(LHSC, IntType, DL); in optimizeMemCmpConstantSize()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/ |
D | SimplifyLibCalls.cpp | 1016 if (auto *LHSC = dyn_cast<Constant>(LHS)) { in optimizeMemCmpConstantSize() local 1017 LHSC = ConstantExpr::getBitCast(LHSC, IntType->getPointerTo()); in optimizeMemCmpConstantSize() 1018 LHSV = ConstantFoldLoadFromConstPtr(LHSC, IntType, DL); in optimizeMemCmpConstantSize()
|
/external/clang/lib/AST/ |
D | ASTContext.cpp | 4843 const Type *LHSC = getCanonicalType(LHS).getTypePtr(); in getIntegerTypeOrder() local 4847 if (const EnumType *ET = dyn_cast<EnumType>(LHSC)) in getIntegerTypeOrder() 4848 LHSC = getIntegerTypeForEnum(ET); in getIntegerTypeOrder() 4852 if (LHSC == RHSC) return 0; in getIntegerTypeOrder() 4854 bool LHSUnsigned = LHSC->isUnsignedIntegerType(); in getIntegerTypeOrder() 4857 unsigned LHSRank = getIntegerRank(LHSC); in getIntegerTypeOrder()
|
/external/llvm-project/clang/lib/AST/ |
D | ASTContext.cpp | 6399 const Type *LHSC = getCanonicalType(LHS).getTypePtr(); in getIntegerTypeOrder() local 6403 if (const auto *ET = dyn_cast<EnumType>(LHSC)) in getIntegerTypeOrder() 6404 LHSC = getIntegerTypeForEnum(ET); in getIntegerTypeOrder() 6408 if (LHSC == RHSC) return 0; in getIntegerTypeOrder() 6410 bool LHSUnsigned = LHSC->isUnsignedIntegerType(); in getIntegerTypeOrder() 6413 unsigned LHSRank = getIntegerRank(LHSC); in getIntegerTypeOrder()
|
/external/llvm/lib/CodeGen/SelectionDAG/ |
D | SelectionDAGBuilder.cpp | 4575 if (ConstantFPSDNode *LHSC = dyn_cast<ConstantFPSDNode>(LHS)) { in expandPow() local 4577 IsExp10 = LHSC->isExactlyValue(Ten); in expandPow()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/SelectionDAG/ |
D | SelectionDAGBuilder.cpp | 5388 if (ConstantFPSDNode *LHSC = dyn_cast<ConstantFPSDNode>(LHS)) { in expandPow() local 5390 IsExp10 = LHSC->isExactlyValue(Ten); in expandPow()
|
/external/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
D | SelectionDAGBuilder.cpp | 5176 if (ConstantFPSDNode *LHSC = dyn_cast<ConstantFPSDNode>(LHS)) { in expandPow() local 5178 IsExp10 = LHSC->isExactlyValue(Ten); in expandPow()
|