Issue 64740
Summary AArch64 globalisel codegen clobbering return address on stack
Labels new issue
Assignees
Reporter mstorsjo
    This is reduced from a failure in libc++'s testcase `std/utilities/charconv/charconv.to.chars/integral.pass.cpp` when run on an aarch64-mingw target.

```llvm
target datalayout = "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-w64-windows-gnu" 
 
%"struct.std::__1::integral_constant" = type { i8 } 
 
; Function Attrs: mustprogress noinline nounwind optnone uwtable 
define dso_local noundef i1 @_Z8_fits_inIcjNSt3__114numeric_limitsIcEEEbT0_NS0_17integral_constantIbLb0EEES5_z(i32 noundef %0, i8 %1, i8 %2, ...) {
  %4 = alloca %"struct.std::__1::integral_constant", align 1     
  %5 = alloca %"struct.std::__1::integral_constant", align 1 
  %6 = alloca i32, align 4 
  %7 = getelementptr inbounds %"struct.std::__1::integral_constant", ptr %4, i32 0, i32 0 
  store i8 %1, ptr %7, align 1 
  %8 = getelementptr inbounds %"struct.std::__1::integral_constant", ptr %5, i32 0, i32 0 
  store i8 %2, ptr %8, align 1 
  store i32 %0, ptr %6, align 4 
  %9 = load i32, ptr %6, align 4 
  %10 = call noundef i8 @_ZNSt3__114numeric_limitsIcE3maxB7v180000Ev() 
  %11 = zext i8 %10 to i32 
  %12 = icmp ule i32 %9, %11 
  ret i1 %12 
} 
 
declare dso_local noundef i8 @_ZNSt3__114numeric_limitsIcE3maxB7v180000Ev()
```

```console
$ llc -O0 fitsin.ll -filetype asm -o -
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to