llvm.org GIT mirror llvm / a5aaefa
Avoid cppcheck operator precedence warnings. NFCI. Prefer ((X & Y) ? A : B) to (X & Y ? A : B) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359884 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 1 year, 5 months ago
6 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
102102
103103 namespace {
104104
105 static int64_t unrotateSign(uint64_t U) { return U & 1 ? ~(U >> 1) : U >> 1; }
105 static int64_t unrotateSign(uint64_t U) { return (U & 1) ? ~(U >> 1) : U >> 1; }
106106
107107 class BitcodeReaderMetadataList {
108108 /// Array of metadata references.
16121612 case AArch64::MOVIv4s_msl:
16131613 case AArch64::MVNIv2s_msl:
16141614 case AArch64::MVNIv4s_msl:
1615 Inst.addOperand(MCOperand::createImm(cmode & 1 ? 0x110 : 0x108));
1615 Inst.addOperand(MCOperand::createImm((cmode & 1) ? 0x110 : 0x108));
16161616 break;
16171617 }
16181618
1099310993 // When the operand is immediate, using the two least significant bits of
1099410994 // the immediate to set the bits 62:63 of FPSCR.
1099510995 unsigned Mode = MI.getOperand(1).getImm();
10996 BuildMI(*BB, MI, dl, TII->get(Mode & 1 ? PPC::MTFSB1 : PPC::MTFSB0))
10996 BuildMI(*BB, MI, dl, TII->get((Mode & 1) ? PPC::MTFSB1 : PPC::MTFSB0))
1099710997 .addImm(31);
1099810998
10999 BuildMI(*BB, MI, dl, TII->get(Mode & 2 ? PPC::MTFSB1 : PPC::MTFSB0))
10999 BuildMI(*BB, MI, dl, TII->get((Mode & 2) ? PPC::MTFSB1 : PPC::MTFSB0))
1100011000 .addImm(30);
1100111001 } else if (MI.getOpcode() == PPC::SETRND) {
1100211002 DebugLoc dl = MI.getDebugLoc();
298298 unsigned HalfMask = Imm >> (l * 4);
299299 unsigned HalfBegin = (HalfMask & 0x3) * HalfSize;
300300 for (unsigned i = HalfBegin, e = HalfBegin + HalfSize; i != e; ++i)
301 ShuffleMask.push_back(HalfMask & 8 ? SM_SentinelZero : (int)i);
301 ShuffleMask.push_back((HalfMask & 8) ? SM_SentinelZero : (int)i);
302302 }
303303 }
304304
1157611576 DAG.getBitcast(MVT::v4i32, InputV),
1157711577 getV4X86ShuffleImm8ForMask(PSHUFDMask, DL, DAG));
1157811578 int PSHUFWMask[4] = {1, -1, -1, -1};
11579 unsigned OddEvenOp = (Offset & 1 ? X86ISD::PSHUFLW : X86ISD::PSHUFHW);
11579 unsigned OddEvenOp = (Offset & 1) ? X86ISD::PSHUFLW : X86ISD::PSHUFHW;
1158011580 return DAG.getBitcast(
1158111581 VT, DAG.getNode(OddEvenOp, DL, MVT::v8i16,
1158211582 DAG.getBitcast(MVT::v8i16, InputV),
275275
276276 /// Pick a random type.
277277 Type *pickType() {
278 return (getRandom() & 1 ? pickVectorType() : pickScalarType());
278 return (getRandom() & 1) ? pickVectorType() : pickScalarType();
279279 }
280280
281281 /// Pick a random pointer type.