craig.topper added a comment. Wild speculation. This may be a historical artifact of LoadInst and StoreInst having their getAlignment() function written like this when this limit was created
unsigned getAlignment() const { return (1 << (getSubclassDataFromInstruction() >> 1)) >> 1; } Because "1" is signed int the left shift produced a signed int. The final right shift would be an arithmetic shift. So if the alignment was 1 << 30, the subclass data would be 31, the shift would produce INT_MIN, and the arithmetic right shift would produce 0xc0000000 which would be incorrect. AllocaInst used 1U instead of 1 so would have been immune. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108661/new/ https://reviews.llvm.org/D108661 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits