Skip to content

[X86] Correct 32-bit immediate assertion and fix 64-bit lowering for huge frame offsets #123872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

wesleywiser
Copy link
Member

@wesleywiser wesleywiser commented Jan 22, 2025

The assertion previously did not work correctly because the operand was being truncated to an int prior to comparison.

Change the assertion into a a reported error as suggested in #101840 (comment) by @arsenm

Finally, fix the lowering on 64-bit targets so that offsets larger than 32-bit are correctly addressed and add tests for various reported issues.

@llvmbot
Copy link
Member

llvmbot commented Jan 22, 2025

@llvm/pr-subscribers-backend-x86

Author: Wesley Wiser (wesleywiser)

Changes

The assertion previously did not work correctly because the operand was being truncated to an int prior to comparison.

Change the assertion into a a reported error as suggested in #101840 (comment) by @arsenm


Full diff: https://github.com/llvm/llvm-project/pull/123872.diff

1 Files Affected:

  • (modified) llvm/lib/Target/X86/X86RegisterInfo.cpp (+4-5)
diff --git a/llvm/lib/Target/X86/X86RegisterInfo.cpp b/llvm/lib/Target/X86/X86RegisterInfo.cpp
index 4faf8bca4f9e02..8a35de5ca98f11 100644
--- a/llvm/lib/Target/X86/X86RegisterInfo.cpp
+++ b/llvm/lib/Target/X86/X86RegisterInfo.cpp
@@ -965,11 +965,10 @@ X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
   }
 
   if (MI.getOperand(FIOperandNum+3).isImm()) {
-    // Offset is a 32-bit integer.
-    int Imm = (int)(MI.getOperand(FIOperandNum + 3).getImm());
-    int Offset = FIOffset + Imm;
-    assert((!Is64Bit || isInt<32>((long long)FIOffset + Imm)) &&
-           "Requesting 64-bit offset in 32-bit immediate!");
+    int64_t Imm = MI.getOperand(FIOperandNum + 3).getImm();
+    int Offset = FIOffset + (int)Imm;
+    if (!Is64Bit && !isInt<32>((int64_t)FIOffset + Imm))
+      MI.emitGenericError(("Requesting 64-bit offset in 32-bit immediate: " + MF.getName()).str());
     if (Offset != 0 || !tryOptimizeLEAtoMOV(II))
       MI.getOperand(FIOperandNum + 3).ChangeToImmediate(Offset);
   } else {

Copy link

github-actions bot commented Jan 22, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@wesleywiser wesleywiser force-pushed the fix_32_bit_immediate_assert branch from c82b6db to 0dd16eb Compare January 22, 2025 03:56
@abhishek-kaushik22
Copy link
Contributor

Maybe the IR from #121932 could be added as test

define dso_local i32 @main() #0 {
entry:
  %x = alloca [2147483647 x i8], align 16
  %arrayidx = getelementptr inbounds [2147483647 x i8], ptr %x, i64 0, i64 -42
  store i8 33, ptr %arrayidx, align 2
  ret i32 0
}

attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

@wesleywiser wesleywiser force-pushed the fix_32_bit_immediate_assert branch from 0dd16eb to ecc78a2 Compare January 23, 2025 04:57
@RKSimon
Copy link
Collaborator

RKSimon commented Jan 31, 2025

Please can you add test coverage for #113856 as well - note its a fast-isel bug

@wesleywiser wesleywiser force-pushed the fix_32_bit_immediate_assert branch from ecc78a2 to 79d4afd Compare February 8, 2025 17:32
@wesleywiser
Copy link
Member Author

Thanks for finding those issues! I've added a test to cover #113856.

@wesleywiser wesleywiser force-pushed the fix_32_bit_immediate_assert branch from 79d4afd to 58e318d Compare February 11, 2025 00:07
@wesleywiser wesleywiser force-pushed the fix_32_bit_immediate_assert branch from 58e318d to fd0853c Compare July 7, 2025 23:29
@wesleywiser wesleywiser force-pushed the fix_32_bit_immediate_assert branch from fd0853c to 54a7703 Compare July 8, 2025 00:50
@wesleywiser wesleywiser requested a review from RKSimon July 8, 2025 21:18
@wesleywiser
Copy link
Member Author

Hi @RKSimon, just a friendly ping for review when you get a chance. Thanks!

@wesleywiser
Copy link
Member Author

Hi @RKSimon, just wanted to remind you that I think this is ready for another round of review when you have some time. Thank you!

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one minor @phoebewang @arsenm any further comments?

@phoebewang phoebewang requested a review from e-kud July 24, 2025 10:52
@phoebewang
Copy link
Contributor

If I read the code correctly, it not only emit error for 32-bit but also fix the bug in 64-bit. The title and description don't mention the latter?

Comment on lines +973 to +986
RS->enterBasicBlockEnd(MBB);
RS->backward(std::next(II));

Register ScratchReg = RS->scavengeRegisterBackwards(
X86::GR64RegClass, II, /*RestoreAfter=*/false, /*SPAdj=*/0,
/*AllowSpill=*/true);
assert(ScratchReg != 0 && "scratch reg was 0");
RS->setRegUsed(ScratchReg);

BuildMI(MBB, II, DL, TII->get(X86::MOV64ri), ScratchReg).addImm(Offset);

MI.getOperand(FIOperandNum + 3).setImm(0);
MI.getOperand(FIOperandNum + 2).setReg(ScratchReg);

return false;
Copy link
Contributor

@e-kud e-kud Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need all this manual work with RegisterScavenging? There is already an existing mechanism that is used for AArch64. All we need here is to create a virtual register and define

bool X86RegisterInfo::requiresRegisterScavenging(
    const MachineFunction &MF) const {
  return !isInt<32>(MF.getFrameInfo().estimateStackSize(MF));
}

bool X86RegisterInfo::requiresFrameIndexScavenging(
    const MachineFunction &MF) const {
  return true;
}

I'm not very familiar with RegisterScavenging, is the compilation time a concern here? Also, setting the requiresFrameIndexScavenging to true allows to avoid unnecessary preemptive stack allocation in X86FrameLowering

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! I'm not super familiar with this code and I was pointed to using RegisterScavenging as a way to solve the issue of needing a scratch register here.

Looking at the mechanism in AArch64, I think X86 is not currently set up to use the same thing. Locally, in addition to requiresFrameIndexScavenging, I also needed to add an override to enable requiresVirtualBaseRegisters for LocalStackSlotAllocation to kick in. With that done, I also needed to override at least needsFrameBaseReg, isFrameOffsetLegal and materializeFrameBaseRegister which is quite a bit more code than the few lines needed here to use RegisterScavenging manually.

Have I misunderstood your suggestion or what is needed to implement it? Is this still the preferred approach in contrast to RegisterScavenging directly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @e-kud, just pinging you in case you missed the above message. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is...complicated and requires a lot of other context to consider using or not. It's well beyond the scope of this patch

@wesleywiser wesleywiser changed the title [X86] Fix 32-bit immediate assertion and convert into backend error [X86] Correct 32-bit immediate assertion and fix 64-bit lowering for huge frame offsets Jul 28, 2025
Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with error message phrasing tweak

The assertion previously did not work correctly because the operand was
being truncated to an `int` prior to comparison.
Enable RegisterScavenging for X86 so that we can scavenge a register
to use if the frame is very, very large or if the displacement for
an instruction is too large and we need to rewrite it to use the
scavenged register.
@wesleywiser wesleywiser force-pushed the fix_32_bit_immediate_assert branch from 54a7703 to 00bea8d Compare August 2, 2025 20:06
@wesleywiser
Copy link
Member Author

At this point, I believe all review feedback has been responded to and CI is green.

If there's no other feedback, I would appreciate someone merging for me as I do not have merge rights. Thanks!

@abhishek-kaushik22 abhishek-kaushik22 merged commit 69bec0a into llvm:main Aug 3, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 3, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-expensive-checks-debian running on gribozavr4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/23760

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/X86/large-displacements.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
not /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc < /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll -mtriple=i686 -filetype=null 2>&1 | /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll -check-prefix=ERR-i686 # RUN: at line 1
+ /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll -check-prefix=ERR-i686
+ not /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=i686 -filetype=null
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll:46:13: error: ERR-i686: expected string not found in input
; ERR-i686: error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit
            ^
<stdin>:1:68: note: scanning from here
error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit
                                                                   ^
<stdin>:2:1: note: possible intended match here
warning: <unknown>:0:0: stack frame size (4294967324) exceeds limit (4294967295) in function 'main'
^

Input file: <stdin>
Check file: /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit 
check:46'0                                                                        X error: no match found
            2: warning: <unknown>:0:0: stack frame size (4294967324) exceeds limit (4294967295) in function 'main' 
check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:46'1     ?                                                                                                    possible intended match
            3:  
check:46'0     ~
            4: # After Prologue/Epilogue Insertion & Frame Finalization 
check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5: # Machine code for function main: NoPHIs, TracksLiveness, NoVRegs, TiedOpsRewritten, TracksDebugUserValues 
check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            6: Frame Objects: 
check:46'0     ~~~~~~~~~~~~~~~
            7:  fi#-1: size=4, align=4, fixed, at location [SP-4] 
check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            .
            .
            .
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 3, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-expensive-checks-ubuntu running on as-builder-4 while building llvm at step 7 "test-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/187/builds/8820

Here is the relevant piece of the build log for the reference
Step 7 (test-check-all) failure: Test just built components: check-all completed (failure)
******************** TEST 'LLVM :: CodeGen/X86/large-displacements.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
not /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/build/bin/llc < /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll -mtriple=i686 -filetype=null 2>&1 | /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll -check-prefix=ERR-i686 # RUN: at line 1
+ not /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/build/bin/llc -mtriple=i686 -filetype=null
+ /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/build/bin/FileCheck /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll -check-prefix=ERR-i686
/home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll:46:13: error: ERR-i686: expected string not found in input
; ERR-i686: error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit
            ^
<stdin>:1:68: note: scanning from here
error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit
                                                                   ^
<stdin>:2:1: note: possible intended match here
warning: <unknown>:0:0: stack frame size (4294967324) exceeds limit (4294967295) in function 'main'
^

Input file: <stdin>
Check file: /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/X86/large-displacements.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit 
check:46'0                                                                        X error: no match found
            2: warning: <unknown>:0:0: stack frame size (4294967324) exceeds limit (4294967295) in function 'main' 
check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:46'1     ?                                                                                                    possible intended match
            3:  
check:46'0     ~
            4: # After Prologue/Epilogue Insertion & Frame Finalization 
check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5: # Machine code for function main: NoPHIs, TracksLiveness, NoVRegs, TiedOpsRewritten, TracksDebugUserValues 
check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            6: Frame Objects: 
check:46'0     ~~~~~~~~~~~~~~~
            7:  fi#-1: size=4, align=4, fixed, at location [SP-4] 
check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            .
            .
            .
>>>>>>

--

********************


@abhishek-kaushik22
Copy link
Contributor

Looks like the large-displacements.ll tests needs an update, I'm trying to fix this.

Comment on lines +989 to +992
// ... for 32-bit targets, this is a bug!
if (!Is64Bit && !FitsIn32Bits)
MI.emitGenericError(("64-bit offset calculated but target is 32-bit"));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is that while we report an error here, we leave the operand in the instruction which the verifier then reports. What's the right approach to resolve that?

I guess we could replace the overside operand with a saturated value or 0 or something. Or perhaps replace the entire instruction with a trap, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trap would be nicer, see #124217

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion @phoebewang! I've implemented that in #152239.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 3, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-win running on sie-win-worker while building llvm at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/21134

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: COFF/import_weak_alias.test' FAILED ********************
Exit Code: 3221225477

Command Output (stdout):
--
# RUN: at line 3
split-file Z:\b\llvm-clang-x86_64-sie-win\llvm-project\lld\test\COFF\import_weak_alias.test Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir
# executed command: split-file 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\lld\test\COFF\import_weak_alias.test' 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir'
# note: command had no output on stdout or stderr
# RUN: at line 4
z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-mc.exe --filetype=obj -triple=x86_64-windows-msvc Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir/foo.s -o Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.foo.obj
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-mc.exe' --filetype=obj -triple=x86_64-windows-msvc 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir/foo.s' -o 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.foo.obj'
# note: command had no output on stdout or stderr
# RUN: at line 5
z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-mc.exe --filetype=obj -triple=x86_64-windows-msvc Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir/qux.s -o Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.qux.obj
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\llvm-mc.exe' --filetype=obj -triple=x86_64-windows-msvc 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dir/qux.s' -o 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.qux.obj'
# note: command had no output on stdout or stderr
# RUN: at line 6
z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.qux.obj Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.foo.obj -out:Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dll -dll
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe' 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.qux.obj' 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.foo.obj' '-out:Z:\b\llvm-clang-x86_64-sie-win\build\tools\lld\test\COFF\Output\import_weak_alias.test.tmp.dll' -dll
# .---command stderr------------
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | Stack dump:
# | 0.	Program arguments: z:\\b\\llvm-clang-x86_64-sie-win\\build\\bin\\lld-link.exe Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\lld\\test\\COFF\\Output\\import_weak_alias.test.tmp.qux.obj Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\lld\\test\\COFF\\Output\\import_weak_alias.test.tmp.foo.obj -out:Z:\\b\\llvm-clang-x86_64-sie-win\\build\\tools\\lld\\test\\COFF\\Output\\import_weak_alias.test.tmp.dll -dll
# | Exception Code: 0xC0000005
# | #0 0x00007ff8b39c1b39 (C:\Windows\System32\KERNELBASE.dll+0x41b39)
# | #1 0x00007ff7d4f6bb18 (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0xcbb18)
# | #2 0x00007ff7d4ff32db (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0x1532db)
# | #3 0x00007ff7d4f4d9aa (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0xad9aa)
# | #4 0x00007ff7d4f4da14 (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0xada14)
# | #5 0x00007ff7d76bfc54 (z:\b\llvm-clang-x86_64-sie-win\build\bin\lld-link.exe+0x281fc54)
# | #6 0x00007ff8b6ad7ac4 (C:\Windows\System32\KERNEL32.DLL+0x17ac4)
# | #7 0x00007ff8b6ffa8c1 (C:\Windows\SYSTEM32\ntdll.dll+0x5a8c1)
# `-----------------------------
# error: command failed with exit status: 0xc0000005

--

********************


@Xazax-hun
Copy link
Collaborator

Based on the discussion in #151860 looks like this needs to be reverted for now. Is someone looking into that?

RKSimon added a commit that referenced this pull request Aug 4, 2025
…ing for huge frame offsets" (#151975)

Reverts #123872 - this is breaking on EXPENSIVE_CHECKS builds

Co-authored-by: Abhishek Kaushik <abhishek.kaushik@intel.com>
@RKSimon
Copy link
Collaborator

RKSimon commented Aug 4, 2025

@Xazax-hun @wesleywiser @abhishek-kaushik22 this has now been reverted

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Aug 4, 2025
…4-bit lowering for huge frame offsets" (#151975)

Reverts llvm/llvm-project#123872 - this is breaking on EXPENSIVE_CHECKS builds

Co-authored-by: Abhishek Kaushik <abhishek.kaushik@intel.com>
wesleywiser added a commit to wesleywiser/llvm-project that referenced this pull request Aug 6, 2025
…huge frame offsets (llvm#123872)

The assertion previously did not work correctly because the operand was
being truncated to an `int` prior to comparison.

Change the assertion into a a reported error as suggested in
llvm#101840 (comment)
by @arsenm

Finally, fix the lowering on 64-bit targets so that offsets larger than
32-bit are correctly addressed and add tests for various reported
issues.
wesleywiser added a commit to wesleywiser/llvm-project that referenced this pull request Aug 6, 2025
…huge frame offsets (llvm#123872)

The assertion previously did not work correctly because the operand was
being truncated to an `int` prior to comparison.

Change the assertion into a a reported error as suggested in
llvm#101840 (comment)
by @arsenm

Finally, fix the lowering on 64-bit targets so that offsets larger than
32-bit are correctly addressed and add tests for various reported
issues.
wesleywiser added a commit to wesleywiser/llvm-project that referenced this pull request Aug 8, 2025
…huge frame offsets (llvm#123872)

The assertion previously did not work correctly because the operand was
being truncated to an `int` prior to comparison.

Change the assertion into a a reported error as suggested in
llvm#101840 (comment)
by @arsenm

Finally, fix the lowering on 64-bit targets so that offsets larger than
32-bit are correctly addressed and add tests for various reported
issues.
krishna2803 pushed a commit to krishna2803/llvm-project that referenced this pull request Aug 12, 2025
…huge frame offsets (llvm#123872)

The assertion previously did not work correctly because the operand was
being truncated to an `int` prior to comparison.

Change the assertion into a a reported error as suggested in
llvm#101840 (comment)
by @arsenm

Finally, fix the lowering on 64-bit targets so that offsets larger than
32-bit are correctly addressed and add tests for various reported
issues.
krishna2803 pushed a commit to krishna2803/llvm-project that referenced this pull request Aug 12, 2025
…ing for huge frame offsets" (llvm#151975)

Reverts llvm#123872 - this is breaking on EXPENSIVE_CHECKS builds

Co-authored-by: Abhishek Kaushik <abhishek.kaushik@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants