aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-03-21 17:40:17 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-03-21 17:42:26 +0100
commit59dbf4d516b19dbe08d378a620b72749513611e5 (patch)
tree9b75cc0702b4fa5d15495dd0fb9b78c1a0b2b34e
parentb32f5d504519b0e5c160ff2a11e34df75cd36cc0 (diff)
downloadllvm-59dbf4d516b19dbe08d378a620b72749513611e5.zip
llvm-59dbf4d516b19dbe08d378a620b72749513611e5.tar.gz
llvm-59dbf4d516b19dbe08d378a620b72749513611e5.tar.bz2
[InstSimplify] Add load of undef aggregate test (NFC)
To make sure this doesn't crash the following commit.
-rw-r--r--llvm/test/Transforms/InstSimplify/ConstProp/loads.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/loads.ll b/llvm/test/Transforms/InstSimplify/ConstProp/loads.ll
index 4da8f0d..6f25b9f 100644
--- a/llvm/test/Transforms/InstSimplify/ConstProp/loads.ll
+++ b/llvm/test/Transforms/InstSimplify/ConstProp/loads.ll
@@ -251,3 +251,13 @@ define i64 @test_array_of_zero_size_array() {
%v = load i64, i64* bitcast ([4294967295 x [0 x i32]]* @g9 to i64*)
ret i64 %v
}
+
+@g10 = constant {i128} {i128 undef}
+
+define i32* @test_undef_aggregate() {
+; CHECK-LABEL: @test_undef_aggregate(
+; CHECK-NEXT: ret i32* undef
+;
+ %v = load i32*, i32** bitcast ({i128}* @g10 to i32**)
+ ret i32* %v
+}