[llvm] [X86] Fix `FastISel` crash on `GEP` with a constant index wider than `64` bits (PR #223432)

Akash Manna via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 10:55:10 PDT 2026


================
@@ -134,4 +134,21 @@ F:
   ret i32 4
 }
 
+; GH220954 - A constant index wider than 64 bits is truncated to the pointer
+; width when folded into the address mode; it used to assert in
+; APInt::getSExtValue.
+define void @test8() nounwind {
+; X32-LABEL: test8:
+; X32:    movl {{-?[0-9]*}}(%esp), %eax
----------------
akash-manna-sky wrote:

Split the two `x86-64` RUN lines into `LINUX/WIN64` prefixes since the red zone changes the frame, and checked the exact offsets on all three targets.

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


More information about the llvm-commits mailing list