aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-02-22 22:23:11 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-02-22 22:23:11 +0000
commit964b70d559fad083744ea2791def82c564087388 (patch)
tree7c9b53c866f77f720f425fbc81f5cfb7cb0227b5 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent157a5d5312bda0ed8da6a434ebcecfe6e646c63e (diff)
downloadllvm-964b70d559fad083744ea2791def82c564087388.zip
llvm-964b70d559fad083744ea2791def82c564087388.tar.gz
llvm-964b70d559fad083744ea2791def82c564087388.tar.bz2
[X86] Create mergeable constant pool entries for AVX
We supported creating mergeable constant pool entries for smaller constants but not for 32-byte AVX constants. llvm-svn: 261584
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 624eaec..4229741 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -270,9 +270,11 @@ selectELFSectionForGlobal(MCContext &Ctx, const GlobalValue *GV,
EntrySize = 4;
} else if (Kind.isMergeableConst8()) {
EntrySize = 8;
- } else {
- assert(Kind.isMergeableConst16() && "unknown data width");
+ } else if (Kind.isMergeableConst16()) {
EntrySize = 16;
+ } else {
+ assert(Kind.isMergeableConst32() && "unknown data width");
+ EntrySize = 32;
}
}
@@ -375,6 +377,8 @@ MCSection *TargetLoweringObjectFileELF::getSectionForConstant(
return MergeableConst8Section;
if (Kind.isMergeableConst16() && MergeableConst16Section)
return MergeableConst16Section;
+ if (Kind.isMergeableConst32() && MergeableConst32Section)
+ return MergeableConst32Section;
if (Kind.isReadOnly())
return ReadOnlySection;