summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-02-21 14:35:42 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2013-02-21 14:35:42 +0000
commit49498dac9d85f06db7beb7ef76a1cde12ed7d091 (patch)
treec0e5e04d6ae42b7467ca24f163b630624338aba7 /llvm/lib/Target/PowerPC
parent54b54e4772c68fe83916cb5850bb271705f3ec64 (diff)
downloadbcm5719-llvm-49498dac9d85f06db7beb7ef76a1cde12ed7d091.tar.gz
bcm5719-llvm-49498dac9d85f06db7beb7ef76a1cde12ed7d091.zip
Code review cleanup for r175697
llvm-svn: 175739
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 8663dd41e5f..561099b24be 100644
--- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -1524,20 +1524,16 @@ void PPCDAGToDAGISel::PostprocessISelDAG() {
// If the relocation information isn't already present on the
// immediate operand, add it now.
if (ReplaceFlags) {
- GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(ImmOpnd);
-
- if (GA) {
+ if (GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(ImmOpnd)) {
DebugLoc dl = GA->getDebugLoc();
const GlobalValue *GV = GA->getGlobal();
ImmOpnd = CurDAG->getTargetGlobalAddress(GV, dl, MVT::i64, 0, Flags);
- } else {
- ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(ImmOpnd);
- if (CP) {
- const Constant *C = CP->getConstVal();
- ImmOpnd = CurDAG->getTargetConstantPool(C, MVT::i64,
- CP->getAlignment(),
- 0, Flags);
- }
+ }
+ else if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(ImmOpnd)) {
+ const Constant *C = CP->getConstVal();
+ ImmOpnd = CurDAG->getTargetConstantPool(C, MVT::i64,
+ CP->getAlignment(),
+ 0, Flags);
}
}
OpenPOWER on IntegriCloud