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

References

lib/CodeGen/AtomicExpandPass.cpp
  852   LLVMContext &Ctx = Builder.getContext();
  865   Builder.SetInsertPoint(BB);
  868       Builder, CI, CI->getCompareOperand()->getType(), Addr, WordSize);
  872       Builder.CreateShl(Builder.CreateZExt(NewVal, PMV.WordType), PMV.ShiftAmt);
  872       Builder.CreateShl(Builder.CreateZExt(NewVal, PMV.WordType), PMV.ShiftAmt);
  874       Builder.CreateShl(Builder.CreateZExt(Cmp, PMV.WordType), PMV.ShiftAmt);
  874       Builder.CreateShl(Builder.CreateZExt(Cmp, PMV.WordType), PMV.ShiftAmt);
  878   LoadInst *InitLoaded = Builder.CreateLoad(PMV.WordType, PMV.AlignedAddr);
  880   Value *InitLoaded_MaskOut = Builder.CreateAnd(InitLoaded, PMV.Inv_Mask);
  881   Builder.CreateBr(LoopBB);
  884   Builder.SetInsertPoint(LoopBB);
  885   PHINode *Loaded_MaskOut = Builder.CreatePHI(PMV.WordType, 2);
  889   Value *FullWord_NewVal = Builder.CreateOr(Loaded_MaskOut, NewVal_Shifted);
  890   Value *FullWord_Cmp = Builder.CreateOr(Loaded_MaskOut, Cmp_Shifted);
  891   AtomicCmpXchgInst *NewCI = Builder.CreateAtomicCmpXchg(
  902   Value *OldVal = Builder.CreateExtractValue(NewCI, 0);
  903   Value *Success = Builder.CreateExtractValue(NewCI, 1);
  906     Builder.CreateBr(EndBB);
  908     Builder.CreateCondBr(Success, EndBB, FailureBB);
  911   Builder.SetInsertPoint(FailureBB);
  915   Value *OldVal_MaskOut = Builder.CreateAnd(OldVal, PMV.Inv_Mask);
  916   Value *ShouldContinue = Builder.CreateICmpNE(Loaded_MaskOut, OldVal_MaskOut);
  917   Builder.CreateCondBr(ShouldContinue, LoopBB, EndBB);
  923   Builder.SetInsertPoint(CI);
  925   Value *FinalOldVal = Builder.CreateTrunc(
  926       Builder.CreateLShr(OldVal, PMV.ShiftAmt), PMV.ValueType);
  928   Res = Builder.CreateInsertValue(Res, FinalOldVal, 0);
  929   Res = Builder.CreateInsertValue(Res, Success, 1);