diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2018-04-13 20:21:00 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2018-04-13 20:21:00 +0000 |
commit | ab40e44ba1b5ae97f53e5a885dbc93a4bed78302 (patch) | |
tree | 19eedbb55619c06a6071cfe3cf51aed131d91df5 /llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | |
parent | dfed941eec93d257ce0671dec032bb67074acdf6 (diff) | |
download | bcm5719-llvm-ab40e44ba1b5ae97f53e5a885dbc93a4bed78302.tar.gz bcm5719-llvm-ab40e44ba1b5ae97f53e5a885dbc93a4bed78302.zip |
Revert r329956, "AArch64: Introduce a DAG combine for folding offsets into addresses."
Caused a hang and eventually an assertion failure in LTO builds
of 7zip-benchmark on aarch64 iOS targets.
http://green.lab.llvm.org/green/job/lnt-ctmark-aarch64-O3-flto/2024/
llvm-svn: 330063
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp index d44eee051aa..eee59f1e719 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp @@ -743,16 +743,14 @@ bool AArch64DAGToDAGISel::SelectAddrModeIndexed(SDValue N, unsigned Size, if (!GAN) return true; - if (GAN->getOffset() % Size == 0) { - const GlobalValue *GV = GAN->getGlobal(); - unsigned Alignment = GV->getAlignment(); - Type *Ty = GV->getValueType(); - if (Alignment == 0 && Ty->isSized()) - Alignment = DL.getABITypeAlignment(Ty); - - if (Alignment >= Size) - return true; - } + const GlobalValue *GV = GAN->getGlobal(); + unsigned Alignment = GV->getAlignment(); + Type *Ty = GV->getValueType(); + if (Alignment == 0 && Ty->isSized()) + Alignment = DL.getABITypeAlignment(Ty); + + if (Alignment >= Size) + return true; } if (CurDAG->isBaseWithConstantOffset(N)) { |