[llvm] [GVN] Skip instructions without value numbers in performScalarPRE (PR #219851)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 00:32:41 PDT 2026
================
@@ -0,0 +1,42 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -passes=gvn -S < %s | FileCheck %s
+
+; Test for #216265: GVN load-PREs %load1, then forwards the i64 store to %conv,
+; so MaterializeAdjustedValue RAUWs a coercing trunc over it without a value
+; number. Scalar PRE on the inserted .pre load's GEP index then looked that
+; trunc up and asserted with "Value not numbered?".
+
+ at g = external global i64
+
+define void @f(i64 noundef %x) {
----------------
antoniofrighetto wrote:
```suggestion
define void @test_coerced_value_not_numbered(i64 noundef %x) {
```
https://github.com/llvm/llvm-project/pull/219851
More information about the llvm-commits
mailing list