[GlobalISel][IRTranslator] Fix switch table lowering to use signed LE not unsigned.
authorAmara Emerson <aemerson@apple.com>
Tue, 24 Sep 2019 00:09:23 +0000 (00:09 +0000)
committerAmara Emerson <aemerson@apple.com>
Tue, 24 Sep 2019 00:09:23 +0000 (00:09 +0000)
commitadec1209e627aecb6634edb46e99e741d95ba95f
treecc973e577126ad9eb5adbcef66a80c59dce1c151
parent837273711e0bbd778573e51171d00e6a4f1174a5
[GlobalISel][IRTranslator] Fix switch table lowering to use signed LE not unsigned.

We were miscompiling switch value comparisons with the wrong signedness, which
shows up when we have things like switch case values with i1 types, which end up
being legalized incorrectly.

Fixes PR43383

llvm-svn: 372675
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-switch.ll