llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Codegen failure for `llvm.{min,max}imum(fp128, fp128)`

Open kparzysz opened this issue 2 years ago • 1 comments

Follow-up to issue https://github.com/llvm/llvm-project/issues/87955.

Two testcases:

define fp128 @minf(fp128 %a, fp128 %b) {
  %v0 = call fp128 @llvm.minimum(fp128 %a, fp128 %b)
  ret fp128 %v0
}

and

define fp128 @maxf(fp128 %a, fp128 %b) {
  %v0 = call fp128 @llvm.maximum(fp128 %a, fp128 %b)
  ret fp128 %v0
}

Both fail with "cannot select" with triple aarch64-unknown-linux-gnu:

$ llc -mtriple aarch64-unknown-linux-gnu < minf.ll

        .text
        .file   "<stdin>"
LLVM ERROR: Cannot select: t5: f128 = fminimum t2, t4
  t2: f128,ch = CopyFromReg t0, Register:f128 %0
    t1: f128 = Register %0
  t4: f128,ch = CopyFromReg t0, Register:f128 %1
    t3: f128 = Register %1
In function: minf

kparzysz avatar Apr 18 '24 17:04 kparzysz

@llvm/issue-subscribers-backend-aarch64

Author: Krzysztof Parzyszek (kparzysz)

Follow-up to issue https://github.com/llvm/llvm-project/issues/87955.

Two testcases:

define fp128 @<!-- -->minf(fp128 %a, fp128 %b) {
  %v0 = call fp128 @<!-- -->llvm.minimum(fp128 %a, fp128 %b)
  ret fp128 %v0
}

and

define fp128 @<!-- -->maxf(fp128 %a, fp128 %b) {
  %v0 = call fp128 @<!-- -->llvm.maximum(fp128 %a, fp128 %b)
  ret fp128 %v0
}

Both fail with "cannot select" with triple aarch64-unknown-linux-gnu:

$ llc -mtriple aarch64-unknown-linux-gnu &lt; minf.ll

        .text
        .file   "&lt;stdin&gt;"
LLVM ERROR: Cannot select: t5: f128 = fminimum t2, t4
  t2: f128,ch = CopyFromReg t0, Register:f128 %0
    t1: f128 = Register %0
  t4: f128,ch = CopyFromReg t0, Register:f128 %1
    t3: f128 = Register %1
In function: minf

llvmbot avatar Apr 18 '24 17:04 llvmbot