Skip to content
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

[i686] Cannot select llvm.{min,max}imum.{f32,f64} #64204

Open
Urgau opened this issue Jul 28, 2023 · 2 comments
Open

[i686] Cannot select llvm.{min,max}imum.{f32,f64} #64204

Urgau opened this issue Jul 28, 2023 · 2 comments
Assignees

Comments

@Urgau
Copy link

Urgau commented Jul 28, 2023

It seems that none of these intrinsics are currently implemented for non-x86_64 (with the x86 backend):

  • llvm.minimum.f32
  • llvm.minimum.f64
  • llvm.maximum.f32
  • llvm.maximum.f64

Error output [godbolt]:

LLVM ERROR: Cannot select: 0x7217400: f32 = fmaximum 0x72172b0, 0x7217390
  0x72172b0: f32,ch = load<(load (s32) from %fixed-stack.1, align 16)> 0x719cd80, FrameIndex:i32<-1>, undef:i32
    0x72171d0: i32 = FrameIndex<-1>
    0x7217240: i32 = undef
  0x7217390: f32,ch = load<(load (s32) from %fixed-stack.0)> 0x719cd80, FrameIndex:i32<-2>, undef:i32
    0x7217320: i32 = FrameIndex<-2>
    0x7217240: i32 = undef
In function: _ZN1a4test17hb60f9f6975710eeaE
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>
1.	Running pass 'Function Pass Manager' on module '<source>'.
2.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN1a4test17hb60f9f6975710eeaE'

Similar to #53353 which was for x86_64

@llvmbot
Copy link
Member

llvmbot commented Jul 28, 2023

@llvm/issue-subscribers-backend-x86

@e-kud e-kud self-assigned this Jul 28, 2023
@e-kud
Copy link
Contributor

e-kud commented Jul 28, 2023

So, actually it is supported for i686 only if any of vector extension is specified. I'm not sure whether we want x87 support for these intrinsics or not. Probably we may wait when glibc has implementation of these functions to lower it as a libcall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants