[Hexagon] Always generate mux out of predicated transfers if possible
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 23 Mar 2018 18:43:09 +0000 (18:43 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 23 Mar 2018 18:43:09 +0000 (18:43 +0000)
commit5f7ba9a74c5dca7e89f601ab6968c5e9ada30ade
treea253e75626c22a952a5b75684f6c114c37f4b817
parentdc86de6b6e3f34c669296f4b4fbc87075c41cc8e
[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
llvm/lib/Target/Hexagon/HexagonGenMux.cpp
llvm/test/CodeGen/Hexagon/cmp_pred.ll
llvm/test/CodeGen/Hexagon/cmp_pred_reg.ll
llvm/test/CodeGen/Hexagon/cmpb_pred.ll
llvm/test/CodeGen/Hexagon/formal-args-i1.ll [new file with mode: 0644]
llvm/test/CodeGen/Hexagon/optimize-mux.ll [new file with mode: 0644]
llvm/test/CodeGen/Hexagon/split-muxii.ll [new file with mode: 0644]
llvm/test/MC/Hexagon/inst_select.ll