[Mips][FastISel] Fix selectBranch on icmp i1
authorPetar Jovanovic <petar.jovanovic@mips.com>
Mon, 24 Sep 2018 14:14:19 +0000 (14:14 +0000)
committerPetar Jovanovic <petar.jovanovic@mips.com>
Mon, 24 Sep 2018 14:14:19 +0000 (14:14 +0000)
commitf9808c5f09d58cb3e1e744a232b9ea390669b2c1
tree9d9a3bc6bd391b0cab91dbf4db23d3825330a918
parent7c142a52e2db5df508fc665c2cc28cbd0ae00ac5
[Mips][FastISel] Fix selectBranch on icmp i1

The r337288 tried to fix result of icmp i1 when its input is not sanitized
by falling back to DagISel. While it now produces the correct result for
bit 0, the other bits can still hold arbitrary value which is not supported
by MipsFastISel branch lowering. This patch fixes the issue by falling back
to DagISel in this case.

Patch by Dragan Mladjenovic.

Differential Revision: https://reviews.llvm.org/D52045

llvm-svn: 342884
llvm/lib/Target/Mips/MipsFastISel.cpp
llvm/test/CodeGen/Mips/Fast-ISel/bricmpi1.ll [new file with mode: 0644]