2016-12-28 02:35:19 +08:00
|
|
|
; RUN: llc -mtriple arm-apple-darwin -filetype asm -o - %s | FileCheck -check-prefix CHECK-ARMv4 %s
|
|
|
|
; RUN: llc -mtriple armv7-apple-darwin -mcpu=cortex-a8 -filetype asm -o - %s | FileCheck -check-prefix CHECK-ARMv7 %s
|
2007-01-01 02:52:39 +08:00
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define i32 @f7(float %a, float %b) {
|
2007-01-01 02:52:39 +08:00
|
|
|
entry:
|
2016-12-28 02:35:19 +08:00
|
|
|
%tmp = fcmp ueq float %a,%b
|
|
|
|
%retval = select i1 %tmp, i32 666, i32 42
|
|
|
|
ret i32 %retval
|
2007-01-01 02:52:39 +08:00
|
|
|
}
|
|
|
|
|
2016-12-28 02:35:19 +08:00
|
|
|
; CHECK-ARMv4-LABEL: f7:
|
2017-01-12 00:23:28 +08:00
|
|
|
; CHECK-ARMv4-DAG: bl ___eqsf2
|
|
|
|
; CHECK-ARMv4-DAG: bl ___unordsf2
|
|
|
|
; CHECK-ARMv4: cmp r0, #0
|
|
|
|
; CHECK-ARMv4: movne r0, #1
|
|
|
|
; CHECK-ARMv4: orrs r0, r0,
|
2016-12-28 02:35:19 +08:00
|
|
|
; CHECK-ARMv4: moveq r0, #42
|
|
|
|
|
|
|
|
; CHECK-ARMv7-LABEL: f7:
|
2017-02-13 20:32:47 +08:00
|
|
|
; CHECK-ARMv7: vcmp.f32
|
2016-12-28 02:35:19 +08:00
|
|
|
; CHECK-ARMv7: vmrs APSR_nzcv, fpscr
|
|
|
|
; CHECK-ARMv7: movweq
|
|
|
|
; CHECK-ARMv7-NOT: vmrs
|
|
|
|
; CHECK-ARMv7: movwvs
|
|
|
|
|