LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 41477 - Stack probing emits incorrect code on gnux32
Summary: Stack probing emits incorrect code on gnux32
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: X86 (show other bugs)
Version: trunk
Hardware: PC Windows NT
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-11 22:02 PDT by Charles Lew
Modified: 2019-04-20 05:43 PDT (History)
6 users (show)

See Also:
Fixed By Commit(s): 358807


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Lew 2019-04-11 22:02:42 PDT
Hello, we've found that stack probing emits incorrect code on gnu x32 platform.

Minimal Repro code:
---------------------------
; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "b.7rcbfp3g-cgu.0"
target datalayout = "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnux32"

define dso_local void @_ZN1b7call_it17h422679d04fa7b4d4E() unnamed_addr #0 {
start:
  %unsized_tmp = alloca i8, i32 undef, align 16
  unreachable
}

attributes #0 = { "probe-stack"="__rust_probestack" }

!llvm.module.flags = !{!0}

!0 = !{i32 7, !"PIE Level", i32 2}
--------------------------

********** EXPANDING POST-RA PSEUDO INSTRS **********
********** Function: _ZN1b7call_it17h422679d04fa7b4d4E
real copy:   $rax = COPY killed renamable $eax
Cannot copy EAX to RAX
LLVM ERROR: Cannot emit physreg copy instruction

--------------------------
For more information, See https://github.com/rust-lang/rust/issues/59674 .
Comment 2 Nikita Popov 2019-04-20 05:43:38 PDT
Fixed by https://reviews.llvm.org/rL358807.