OSDN Git Service

Subzero: Fix JumpTable lowering on x86-64.
authorJim Stichnoth <stichnot@chromium.org>
Mon, 29 Feb 2016 17:54:55 +0000 (09:54 -0800)
committerJim Stichnoth <stichnot@chromium.org>
Mon, 29 Feb 2016 17:54:55 +0000 (09:54 -0800)
commite641e92cb728bb01453d926fa4e69ba8b9ae53bb
tree41d27c042399c147c27e66fc3ccfa0f711d2f3bb
parentb6dcf3c51dd2ce15efa5717eaca20da1a9071fa2
Subzero: Fix JumpTable lowering on x86-64.

The problem is that when switch lowering decides to use a JumpTable and the switch variable is i64 on x86-64, the lowering tries to movzx the i64 variable into an i32 variable, and the Movzx ctor asserts.

This happens when translating pnacl-llc.pexe, but luckily it is also triggered in the existing adv-switch.ll test.

BUG= none
R=jpp@chromium.org

Review URL: https://codereview.chromium.org/1743133002 .
src/IceTargetLoweringX86BaseImpl.h
tests_lit/llvm2ice_tests/adv-switch-opt.ll