llvm.org GIT mirror llvm / 9d5f0ef
Return Undef from isBytewiseValue for empty arrays or structs Reviewers: pcc, eugenis Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64052 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365864 91177308-0d34-0410-b5e6-96231b3b80d8 Vitaly Buka a month ago
2 changed file(s) with 8 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
31773177 if (isa(V))
31783178 return UndefInt8;
31793179
3180 const uint64_t Size = DL.getTypeStoreSize(V->getType());
3181 if (!Size)
3182 return UndefInt8;
3183
31803184 Constant *C = dyn_cast(V);
31813185 if (!C) {
31823186 // Conceptually, we could handle things like:
809809 "i16* inttoptr (i96 -1 to i16*)",
810810 },
811811 {
812 "i8 0",
812 "i8 undef",
813813 "[0 x i8] zeroinitializer",
814814 },
815815 {
817817 "[0 x i8] undef",
818818 },
819819 {
820 "i8 0",
820 "i8 undef",
821821 "[5 x [0 x i8]] zeroinitializer",
822822 },
823823 {
899899 "[2 x i16] [i16 -21836, i16 -21846]]",
900900 },
901901 {
902 "i8 0",
902 "i8 undef",
903903 "{ } zeroinitializer",
904904 },
905905 {
907907 "{ } undef",
908908 },
909909 {
910 "i8 0",
910 "i8 undef",
911911 "{ {}, {} } zeroinitializer",
912912 },
913913 {