It turns out that "align 1" and unaligned are different. Add a bias to the
alignment attribute such that 0 means unaligned. This will probably require a rebuild of llvm-gcc because of the change to Attributes.h. If you see many test failures on "make check", please rebuild your llvm-gcc. llvm-svn: 61030
This commit is contained in:
@@ -128,7 +128,8 @@ static void WriteAttributeTable(const ValueEnumerator &VE,
|
||||
// 5-bit log2 encoded value. Shift the bits above the alignment up by
|
||||
// 11 bits.
|
||||
uint64_t FauxAttr = PAWI.Attrs & 0xffff;
|
||||
FauxAttr |= (1ull<<16)<<((PAWI.Attrs & Attribute::Alignment) >> 16);
|
||||
if (PAWI.Attrs & Attribute::Alignment)
|
||||
FauxAttr |= (1ull<<16)<<(((PAWI.Attrs & Attribute::Alignment)-1) >> 16);
|
||||
FauxAttr |= (PAWI.Attrs & (0x3FFull << 21)) << 11;
|
||||
|
||||
Record.push_back(FauxAttr);
|
||||
|
||||
Reference in New Issue
Block a user