[PATCH] D55169: [ConstantFolding] Handle leading zero-length elements in load folding

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 11 02:40:12 PST 2018


nikic marked an inline comment as done.
nikic added inline comments.


================
Comment at: test/Transforms/ConstProp/loads.ll:309
+; BE-LABEL: @test_array_of_zero_size_array(
+; BE: ret i64 0
+}
----------------
This result is unrelated to this patch, but I'm wondering if it's correct. Is this folding to zero based on UB, as this is effectively an out-of-bounds access to a constant array?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55169/new/

https://reviews.llvm.org/D55169





More information about the llvm-commits mailing list