It's possible to have a constant expression who's size is quite big (e.g.,
authorBill Wendling <isanbard@gmail.com>
Tue, 20 Mar 2012 08:56:43 +0000 (08:56 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 20 Mar 2012 08:56:43 +0000 (08:56 +0000)
commit21e42d0ea55c31ac4d57578f5116fa606d5c87ee
tree968a83337cefdcf191a49ca86b54a90ed8936966
parent89f4e6639d174d20f8be59af4895d7d851e4f624
It's possible to have a constant expression who's size is quite big (e.g.,
i128). In that case, we may not be able to print out the MCExpr as an
expression. For instance, we could have an MCExpr like this:

    0xBEEF0000BEEF0000 | (0xBEEF0000BEEF0000 << 64)

The MCExpr printer handles sizes up to 64-bits, but this expression would
require 128-bits. In this situation, try to evaluate the constant expression and
emit that as the value into 64-bit chunks.
<rdar://problem/11070338>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153081 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
test/CodeGen/X86/2012-03-20-LargeConstantExpr.ll [new file with mode: 0644]