[PATCH] D41981: [SROA] fix assetion failure

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 14:01:20 PST 2018


efriedma added inline comments.


================
Comment at: test/Transforms/SROA/basictest.ll:1712
+  %a48_offset2.cast48 = bitcast i8* %a48_offset2 to i48*
+  %b16_63 = load i48, i48* %a48_offset2.cast48, align 2
+  call void @callee16(i16 %b0_15)
----------------
rnk wrote:
> WOW, I guess this isn't UB because the storage size of i48 is 8 bytes, right? Crazy.
No, this is UB; an i48 has a storage size of 6 bytes.

Granted, we still shouldn't crash.


https://reviews.llvm.org/D41981





More information about the llvm-commits mailing list