diff options
author | Tim Northover <tnorthover@apple.com> | 2016-03-24 15:38:38 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-03-24 15:38:38 +0000 |
commit | 4498eff9bbbb79b963c97c8cdcaee46796629428 (patch) | |
tree | dc3468500053b1eab5e30dd290908643a3d99a31 /llvm/lib/Target | |
parent | 9babad25e59551b72701903db3aead24e820dd01 (diff) | |
download | bcm5719-llvm-4498eff9bbbb79b963c97c8cdcaee46796629428.tar.gz bcm5719-llvm-4498eff9bbbb79b963c97c8cdcaee46796629428.zip |
CodeGen: extend RHS when splitting ATOMIC_CMP_SWAP_WITH_SUCCESS.
If the operation's type has been promoted during type legalization, we
need to account for the fact that the high bits of the comparison
operand are likely unspecified.
The LHS is usually zero-extended, but MIPS sign extends it, so we have
to be slightly careful.
Patch by Simon Dardis.
llvm-svn: 264296
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.h b/llvm/lib/Target/Mips/MipsISelLowering.h index f1b31243623..31ae235ab45 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.h +++ b/llvm/lib/Target/Mips/MipsISelLowering.h @@ -238,6 +238,10 @@ namespace llvm { bool isCheapToSpeculateCttz() const override; bool isCheapToSpeculateCtlz() const override; + bool hasSignExtendedAtomicOps() const override { + return true; + } + void LowerOperationWrapper(SDNode *N, SmallVectorImpl<SDValue> &Results, SelectionDAG &DAG) const override; |