Skip to content

Commit 7f7e684

Browse files
author
git apple-llvm automerger
committed
Merge commit '1e4b179bf821' from llvm.org/release/11.x into apple/stable/20200714
2 parents 594fe43 + 1e4b179 commit 7f7e684

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2857,7 +2857,7 @@ static void emitGlobalConstantImpl(const DataLayout &DL, const Constant *CV,
28572857
if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
28582858
const uint64_t StoreSize = DL.getTypeStoreSize(CV->getType());
28592859

2860-
if (StoreSize < 8) {
2860+
if (StoreSize <= 8) {
28612861
if (AP.isVerbose())
28622862
AP.OutStreamer->GetCommentOS() << format("0x%" PRIx64 "\n",
28632863
CI->getZExtValue());

llvm/test/CodeGen/Mips/emit-big-cst.ll

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
; LE-NEXT: .space 5
1717
; LE-NEXT: .size bigCst, 16
1818

19+
; BE-LABEL: notSoBigCst:
20+
; BE-NEXT: .8byte 72057594037927935
21+
; BE-NEXT: .size notSoBigCst, 8
22+
23+
; LE-LABEL: notSoBigCst:
24+
; LE-NEXT: .8byte 72057594037927935
25+
; LE-NEXT: .size notSoBigCst, 8
26+
1927
; BE-LABEL: smallCst:
2028
; BE-NEXT: .2byte 4386
2129
; BE-NEXT: .byte 51
@@ -38,4 +46,14 @@ define void @accessBig(i64* %storage) {
3846
ret void
3947
}
4048

49+
@notSoBigCst = internal constant i57 72057594037927935
50+
51+
define void @accessNotSoBig(i64* %storage) {
52+
%addr = bitcast i64* %storage to i57*
53+
%bigLoadedCst = load volatile i57, i57* @notSoBigCst
54+
%tmp = add i57 %bigLoadedCst, 1
55+
store i57 %tmp, i57* %addr
56+
ret void
57+
}
58+
4159
@smallCst = internal constant i24 1122867

0 commit comments

Comments
 (0)