[llvm] Reland "DAG: Preserve range metadata when load is narrowed" (#128144) (PR #130609)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 11 12:05:43 PDT 2025
================
@@ -0,0 +1,21 @@
+; RUN: llc < %s
+;
+; This test case is reduced from RangeConstraintManager.cpp in a ASan build.
+; It crashes reduceLoadWidth in DAGCombiner.cpp. Preservation of range
+; metdata must ensure that ConstantRange truncation is strictly smaller.
+
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define ptr @_ZN12_GLOBAL__N_121SymbolicRangeInferrer19VisitBinaryOperatorILN5clang18BinaryOperatorKindE15EEENS2_4ento8RangeSetES5_S5_NS2_8QualTypeE() {
+entry:
+ %0 = load i8, ptr null, align 4, !range !0, !noundef !1
----------------
LU-JOHN wrote:
Use named values. Changed null load/stores.
https://github.com/llvm/llvm-project/pull/130609
More information about the llvm-commits
mailing list