OSDN Git Service

[LowerSwitch][AMDGPU] Do not handle impossible values
authorRoman Tereshin <rtereshin@apple.com>
Fri, 22 Feb 2019 14:33:46 +0000 (14:33 +0000)
committerRoman Tereshin <rtereshin@apple.com>
Fri, 22 Feb 2019 14:33:46 +0000 (14:33 +0000)
commit5157eeb1c103137a9c68a55ae0177f11f5ded167
tree245459be1bba3858d95522c78f3e3235eb009115
parent0ac04b4ce62a458fc685178e3c7584a421ebe13d
[LowerSwitch][AMDGPU] Do not handle impossible values

This patch adds LazyValueInfo to LowerSwitch to compute the range of the
value being switched over and reduce the size of the tree LowerSwitch
builds to lower a switch.

Reviewed By: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354670 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LowerSwitch.cpp
test/CodeGen/AMDGPU/valu-i1.ll
test/Transforms/LowerSwitch/do-not-handle-impossible-values.ll [new file with mode: 0644]
test/Transforms/Util/lowerswitch.ll