[llgo] irgen: generate switch instructions

Summary:
    With this patch, llgo uses ssautil.Switches
    to reconstitute (and synthesise) switches,
    which can then be lowered to lookup tables,
    trees, etc.

    We currently only handle integer const case
    switches. We erase the comparison blocks (other
    than the initial block), and generate a switch
    instruction at the end of the block starting
    the if-else-if chain. ssautil.Switches does
    not remove duplicate const cases (e.g. same
    operands for "||"), so we do this in llgo for
    now.

Test Plan: lit test added

Reviewers: pcc

Reviewed By: pcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6831

llvm-svn: 225433
GitOrigin-RevId: f3718a9bf100596cce88f0d5ed27c16a204fe58f
3 files changed