[llvm] [EarlyCSE] Check if getValueType() returns nullptr (PR #195868)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 07:59:14 PDT 2026
================
@@ -0,0 +1,23 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt < %s -S -passes='early-cse<memssa>' | FileCheck %s
+
+;; Regression test to ensure that we do not segfault when processing target
+;; specific intrinsics around memset loads.
+
+target triple = "aarch64-grtev4-linux-gnu"
+
+define { <8 x i8>, <8 x i8>, <8 x i8> } @foo() {
+; CHECK-LABEL: define { <8 x i8>, <8 x i8>, <8 x i8> } @foo() {
+; CHECK-NEXT: [[BB:.*:]]
+; CHECK-NEXT: call void @llvm.memset.p0.i64(ptr null, i8 0, i64 0, i1 false)
+; CHECK-NEXT: [[CALL:%.*]] = call { <8 x i8>, <8 x i8>, <8 x i8> } @llvm.aarch64.neon.ld3.v8i8.p0(ptr null)
+; CHECK-NEXT: ret { <8 x i8>, <8 x i8>, <8 x i8> } [[CALL]]
+;
+bb:
+ call void @llvm.memset.p0.i64(ptr null, i8 0, i64 0, i1 false)
+ %call = call { <8 x i8>, <8 x i8>, <8 x i8> } @llvm.aarch64.neon.ld3.v8i8.p0(ptr null)
----------------
boomanaiden154 wrote:
`ptr %p` on both as a function parameter also reproduces the issue. I've switched to that.
https://github.com/llvm/llvm-project/pull/195868
More information about the llvm-commits
mailing list