[llvm] [LTO][Veclib] Fix vector library handling with LTO (PR #170638)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 8 06:10:15 PST 2025
================
@@ -0,0 +1,20 @@
+; REQUIRES: aarch64-registered-target
+; RUN: opt -module-summary %s -o %t.bc
+; RUN: llvm-lto2 run %t.bc -o %t.o -save-temps \
+; RUN: -r %t.bc,compute,px \
+; RUN: -mcpu=neoverse-v1 -O3 \
+; RUN: -vector-library=ArmPL
+; RUN: llvm-nm %t.o.1 | FileCheck %s
+
+; This test verifies that the VecLib propagation in LTO prevents a crash
+; when compiling scalable vector frem operations.
+
+; CHECK: compute
+
+target triple = "aarch64-unknown-linux-gnu"
+
+define fastcc <vscale x 2 x double> @compute(<vscale x 2 x double> %0) {
+entry:
+ %1 = frem <vscale x 2 x double> %0, zeroinitializer
----------------
arsenm wrote:
Use named values in tests. Also better to use a real value instead of this degenerate case which can fold to a constant?
https://github.com/llvm/llvm-project/pull/170638
More information about the llvm-commits
mailing list