diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-03-27 14:10:11 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-03-27 14:10:11 +0000 |
commit | 5c0d7a24e8e5a1aa9632832b65157e62a6d4b553 (patch) | |
tree | f81f5d34581a4db00b1031856bfcd915ff9d3a1b /clang/test/OpenMP/simd_linear_messages.cpp | |
parent | 40f0162a9a99f2a4882196092eb4d43cf5ef7f12 (diff) | |
download | bcm5719-llvm-5c0d7a24e8e5a1aa9632832b65157e62a6d4b553.tar.gz bcm5719-llvm-5c0d7a24e8e5a1aa9632832b65157e62a6d4b553.zip |
Re-commit r355490 "[CodeGen] Omit range checks from jump tables when lowering switches with unreachable default"
Original commit by Ayonam Ray.
This commit adds a regression test for the issue discovered in the
previous commit: that the range check for the jump table can only be
omitted if the fall-through destination of the jump table is
unreachable, which isn't necessarily true just because the default of
the switch is unreachable.
This addresses the missing optimization in PR41242.
> During the lowering of a switch that would result in the generation of a
> jump table, a range check is performed before indexing into the jump
> table, for the switch value being outside the jump table range and a
> conditional branch is inserted to jump to the default block. In case the
> default block is unreachable, this conditional jump can be omitted. This
> patch implements omitting this conditional branch for unreachable
> defaults.
>
> Differential Revision: https://reviews.llvm.org/D52002
> Reviewers: Hans Wennborg, Eli Freidman, Roman Lebedev
llvm-svn: 357067
Diffstat (limited to 'clang/test/OpenMP/simd_linear_messages.cpp')
0 files changed, 0 insertions, 0 deletions