reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
  101   if (RMWI.isVolatile())
  106   if (isSaturating(RMWI) &&
  107       RMWI.getOperation() != AtomicRMWInst::Xchg) {
  108     RMWI.setOperation(AtomicRMWInst::Xchg);
  109     return &RMWI;
  112   AtomicOrdering Ordering = RMWI.getOrdering();
  119   if (RMWI.getOperation() == AtomicRMWInst::Xchg &&
  120       RMWI.use_empty()) {
  124     auto *SI = new StoreInst(RMWI.getValOperand(),
  125                              RMWI.getPointerOperand(), &RMWI);
  125                              RMWI.getPointerOperand(), &RMWI);
  126     SI->setAtomic(Ordering, RMWI.getSyncScopeID());
  127     SI->setAlignment(MaybeAlign(DL.getABITypeAlignment(RMWI.getType())));
  128     return eraseInstFromFunction(RMWI);
  131   if (!isIdempotentRMW(RMWI))
  138   if (RMWI.getType()->isIntegerTy() &&
  139       RMWI.getOperation() != AtomicRMWInst::Or) {
  140     RMWI.setOperation(AtomicRMWInst::Or);
  141     RMWI.setOperand(1, ConstantInt::get(RMWI.getType(), 0));
  141     RMWI.setOperand(1, ConstantInt::get(RMWI.getType(), 0));
  142     return &RMWI;
  143   } else if (RMWI.getType()->isFloatingPointTy() &&
  144              RMWI.getOperation() != AtomicRMWInst::FAdd) {
  145     RMWI.setOperation(AtomicRMWInst::FAdd);
  146     RMWI.setOperand(1, ConstantFP::getNegativeZero(RMWI.getType()));
  146     RMWI.setOperand(1, ConstantFP::getNegativeZero(RMWI.getType()));
  147     return &RMWI;
  155   LoadInst *Load = new LoadInst(RMWI.getType(), RMWI.getPointerOperand());
  155   LoadInst *Load = new LoadInst(RMWI.getType(), RMWI.getPointerOperand());
  156   Load->setAtomic(Ordering, RMWI.getSyncScopeID());
  157   Load->setAlignment(MaybeAlign(DL.getABITypeAlignment(RMWI.getType())));