[PATCH] D41981: [SROA] fix assetion failure

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 10:49:43 PST 2018


rnk added inline comments.


================
Comment at: lib/Transforms/Scalar/SROA.cpp:130
 SROASplitNonWholeAllocaSlices("sroa-split-nonwhole-alloca-slices",
-                              cl::init(false), cl::Hidden);
+                              cl::init(true), cl::Hidden);
 
----------------
Can you delete this flag instead and simplify the logic that checks it?


================
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)
----------------
WOW, I guess this isn't UB because the storage size of i48 is 8 bytes, right? Crazy.


https://reviews.llvm.org/D41981





More information about the llvm-commits mailing list