-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[X86] Update large-displacement.ll #151860
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
Conversation
After 69bec0a was merged, this test was failing.
@llvm/pr-subscribers-backend-x86 Author: Abhishek Kaushik (abhishek-kaushik22) ChangesAfter 69bec0a was merged, this test was failing. Full diff: https://github.com/llvm/llvm-project/pull/151860.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/X86/large-displacements.ll b/llvm/test/CodeGen/X86/large-displacements.ll
index 8935ec07bb3fa..cc6395d7b7fd0 100644
--- a/llvm/test/CodeGen/X86/large-displacements.ll
+++ b/llvm/test/CodeGen/X86/large-displacements.ll
@@ -6,6 +6,7 @@
define i32 @main() #0 {
; ERR-i686: error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit
+; ERR-i686: warning: <unknown>:0:0: stack frame size (4294967324) exceeds limit (4294967295) in function 'main'
;
; x86_64-LABEL: main:
; x86_64: # %bb.0: # %entry
@@ -44,6 +45,7 @@ entry:
; Same test as above but for an anonymous function.
define i32 @0() #0 {
; ERR-i686: error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit
+; ERR-i686: warning: <unknown>:0:0: stack frame size (4294967324) exceeds limit (4294967295) in function '@0'
;
; x86_64-LABEL: __unnamed_1:
; x86_64: # %bb.0: # %entry
|
@@ -44,6 +45,7 @@ entry: | |||
; Same test as above but for an anonymous function. | |||
define i32 @0() #0 { | |||
; ERR-i686: error: <unknown>:0:0: 64-bit offset calculated but target is 32-bit | |||
; ERR-i686: warning: <unknown>:0:0: stack frame size (4294967324) exceeds limit (4294967295) in function '@0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this emitting both an error and a warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning was always there and was probably missed by @wesleywiser? It is coming from llvm/lib/CodeGen/PrologEpilogInserter.cpp:L315
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you confirm that this works with builds with EXPENSIVE_CHECKS enabled and disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked with a debug build and EXPENSIVE_CHECKS on and it was still failing with a fatal_error in MachineVerifier. I've used --verify-machineinstrs=0
to fix this for now, but probably we need to check the return code in PEIImpl::replaceFrameIndices
to stop codegen after the error?
// If this instruction has a FrameIndex operand, we need to
// use that target machine register info object to eliminate
// it.
TRI.eliminateFrameIndex(MI, SPAdj, i, RS);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry but it looks like we need to revert #123872 and address the problem properly (and when we recommit the tests will need -verify-machineinstr set)
After 69bec0a was merged, this test was failing.