[PATCH] Don't constant fold through zero-length fields

hfinkel at anl.gov hfinkel at anl.gov
Tue Sep 2 10:22:02 PDT 2014


Could you please upload a full-context diff as described here: http://llvm.org/docs/Phabricator.html

If this is well-defined behavior (I realize that indexing off the end of an array is allowed, but whether that is permitted to alias other structure members is unclear to me), then I don't see why an empty type is a special case here. Shouldn't we have the same problem with any off-the-end array access where the array is not the last aggregate member?

================
Comment at: test/Transforms/GlobalOpt/empty-type-field.ll:3
@@ +2,3 @@
+
+; ModuleID = 'bugpoint-passinput.bc'
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
----------------
Remove this line (it is unneeded).

http://reviews.llvm.org/D5032






More information about the llvm-commits mailing list