Issue 147935
Summary [ARM] Incorrect __gnu_h2f_ieee ABI
Labels backend:ARM, miscompilation
Assignees
Reporter nikic
    ```llvm
target triple = "arm-unknown-linux-gnueabihf"

define i1 @test(half %self) #0 {
  %_0 = fcmp une half %self, %self
  ret i1 %_0
}

attributes #0 = { "target-features"="+vfp2" }
```

Produces:
```asm
	.save	{r11, lr}
	push	{r11, lr}
	vmov	r0, s0
	bl	__gnu_h2f_ieee
	vcmp.f32	s0, s0
	mov	r0, #0
	vmrs	APSR_nzcv, fpscr
	movvs	r0, #1
	pop	{r11, lr}
	mov	pc, lr
```
LLVM 20 produced the correct:
```asm
	.save	{r11, lr}
	push	{r11, lr}
	vmov	r0, s0
	bl	__gnu_h2f_ieee
	vmov	s0, r0
	mov	r0, #0
	vcmp.f32	s0, s0
	vmrs	APSR_nzcv, fpscr
	movvs	r0, #1
	pop	{r11, lr}
	mov	pc, lr

```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to