llvm.org GIT mirror llvm / cc461ef
Merging r303679: ------------------------------------------------------------------------ r303679 | oleg | 2017-05-23 15:38:37 -0400 (Tue, 23 May 2017) | 16 lines [ARM] Temporarily disable globals promotion to constant pools to prevent miscompilation Summary: A temporary workaround for PR32780 - rematerialized instructions accessing the same promoted global through different constant pool entries. The patch turns off the globals promotion optimization leaving all its code in place, so that it can be easily turned on once PR32780 is fixed. Since this is a miscompilation issue causing generation of misbehaving code, and the problem is very subtle, the patch might be valuable enough to get into 4.0.1. Reviewers: efriedma, jmolloy Reviewed By: efriedma Subscribers: aemerson, javed.absar, llvm-commits, rengolin, asl, tstellar Differential Revision: https://reviews.llvm.org/D33446 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@303749 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 2 years ago
4 changed file(s) with 8 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
7171 "arm-promote-constant", cl::Hidden,
7272 cl::desc("Enable / disable promotion of unnamed_addr constants into "
7373 "constant pools"),
74 cl::init(true));
74 cl::init(false)); // FIXME: set to true by default once PR32780 is fixed
7575 static cl::opt ConstpoolPromotionMaxSize(
7676 "arm-promote-constant-max-size", cl::Hidden,
7777 cl::desc("Maximum size of constant to promote into a constant pool"),
None ; RUN: llc -relocation-model=static < %s | FileCheck %s
0 ; RUN: llc -relocation-model=static -arm-promote-constant < %s | FileCheck %s
11
22 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
33 target triple = "thumbv7m--linux-gnu"
None ; RUN: llc < %s -O0 -fast-isel=false | FileCheck %s
1 ; RUN: llc < %s -O0 -fast-isel=false -filetype=obj
0 ; RUN: llc < %s -O0 -fast-isel=false -arm-promote-constant | FileCheck %s
1 ; RUN: llc < %s -O0 -fast-isel=false -filetype=obj -arm-promote-constant
22 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
33 target triple = "thumbv6m-arm-linux-gnueabi"
44
None ; RUN: llc -relocation-model=static < %s | FileCheck %s
1 ; RUN: llc -relocation-model=pic < %s | FileCheck %s
2 ; RUN: llc -relocation-model=ropi < %s | FileCheck %s
3 ; RUN: llc -relocation-model=rwpi < %s | FileCheck %s
0 ; RUN: llc -relocation-model=static -arm-promote-constant < %s | FileCheck %s
1 ; RUN: llc -relocation-model=pic -arm-promote-constant < %s | FileCheck %s
2 ; RUN: llc -relocation-model=ropi -arm-promote-constant < %s | FileCheck %s
3 ; RUN: llc -relocation-model=rwpi -arm-promote-constant < %s | FileCheck %s
44
55 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
66 target triple = "armv7--linux-gnueabihf"