1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/MC/Hexagon/inst_select.ll
Krzysztof Parzyszek 14957cb237 [Hexagon] Always generate mux out of predicated transfers if possible
HexagonGenMux would collapse pairs of predicated transfers if it assumed
that the predicated .new forms cannot be created. Turns out that generating
mux is preferable in almost all cases.
Introduce an option -hexagon-gen-mux-threshold that controls the minimum
distance between the instruction defining the predicate and the later of
the two transfers. If the distance is closer than the threshold, mux will
not be generated. Set the threshold to 0 by default.

llvm-svn: 328346
2018-03-23 18:43:09 +00:00

13 lines
340 B
LLVM

; RUN: llc -march=hexagon -filetype=obj %s -o - \
; RUN: | llvm-objdump -d - | FileCheck %s
define i32 @foo (i1 %a, i32 %b, i32 %c)
{
%1 = select i1 %a, i32 %b, i32 %c
ret i32 %1
}
; CHECK: 00 c0 00 85 8500c000 { p0 = tstbit(r0,#0) }
; CHECK: 00 42 01 f4 f4014200 { r0 = mux(p0,r1,r2)
; CHECK: 00 c0 9f 52 529fc000 jumpr r31 }