[llvm] [RegAlloc] Constrain rematted regclass to use (PR #164386)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 03:27:02 PDT 2025


================
@@ -0,0 +1,676 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -verify-machineinstrs < %s | FileCheck %s
+
+; This test recreates a regalloc crash reported in
+; https://github.com/llvm/llvm-project/issues/164181
+; When rematting an instruction we need to make sure to constrain the newly
+; allocated register to both the rematted def's reg class and the use's reg
+; class.
+
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
----------------
arsenm wrote:

```suggestion
```

https://github.com/llvm/llvm-project/pull/164386


More information about the llvm-commits mailing list