Skip to content

Commit 1879e36

Browse files
committed
address comment
1 parent 23b6457 commit 1879e36

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

llvm/include/llvm/IR/IntrinsicsPowerPC.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,16 +1837,16 @@ let TargetPrefix = "ppc" in {
18371837
Intrinsic<[],[],[]>;
18381838
def int_ppc_lbarx :
18391839
Intrinsic<[llvm_i32_ty], [llvm_ptr_ty],
1840-
[IntrReadMem, IntrArgMemOnly, IntrNoDuplicate]>;
1840+
[IntrReadMem, IntrArgMemOnly]>;
18411841
def int_ppc_lharx :
18421842
Intrinsic<[llvm_i32_ty],[llvm_ptr_ty],
1843-
[IntrReadMem, IntrArgMemOnly, IntrNoDuplicate]>;
1843+
[IntrReadMem, IntrArgMemOnly]>;
18441844
def int_ppc_lwarx :
18451845
Intrinsic<[llvm_i32_ty], [llvm_ptr_ty],
1846-
[IntrReadMem, IntrArgMemOnly, IntrNoDuplicate]>;
1846+
[IntrReadMem, IntrArgMemOnly]>;
18471847
def int_ppc_ldarx :
18481848
Intrinsic<[llvm_i64_ty],[llvm_ptr_ty],
1849-
[IntrReadMem, IntrArgMemOnly, IntrNoDuplicate]>;
1849+
[IntrReadMem, IntrArgMemOnly]>;
18501850

18511851
def int_ppc_stdcx :
18521852
ClangBuiltin<"__builtin_ppc_stdcx">,

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,10 +1475,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
14751475
setMinimumJumpTableEntries(PPCMinimumJumpTableEntries);
14761476

14771477
setMinFunctionAlignment(Align(4));
1478-
if (Subtarget.hasPartwordAtomics())
1479-
setMinCmpXchgSizeInBits(8);
1480-
else
1481-
setMinCmpXchgSizeInBits(32);
1478+
setMinCmpXchgSizeInBits(Subtarget.hasPartwordAtomics() ? 8 : 32);
14821479

14831480
switch (Subtarget.getCPUDirective()) {
14841481
default: break;
@@ -12739,12 +12736,12 @@ Value *PPCTargetLowering::emitStoreConditional(IRBuilderBase &Builder,
1273912736
}
1274012737

1274112738
if (SZ == 8 || SZ == 16)
12742-
Val = Builder.CreateZExt(Val, Builder.getIntNTy(32));;
12739+
Val = Builder.CreateZExt(Val, Builder.getInt32Ty());
12740+
;
1274312741

1274412742
Value *Call = Builder.CreateIntrinsic(IntID, {Addr, Val},
1274512743
/*FMFSource=*/nullptr, "stcx");
12746-
Value *Not = Builder.CreateXor(Call,Builder.getInt32(1));
12747-
return Not;
12744+
return Builder.CreateXor(Call, Builder.getInt32(1));
1274812745
}
1274912746

1275012747
// The mappings for emitLeading/TrailingFence is taken from

0 commit comments

Comments
 (0)