summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorAyonam Ray <ayonam@rrlogic.co.in>2019-03-06 10:01:02 +0000
committerAyonam Ray <ayonam@rrlogic.co.in>2019-03-06 10:01:02 +0000
commit2a0f2c5ef3330846149598220467d9f3c6e8b99c (patch)
tree3dadb59669e0f10ea578000cfddf0a8e95320e23 /clang/lib/AST/ExprConstant.cpp
parent7219c7e9af7718f026ac5e3ea72249d037898e5b (diff)
downloadbcm5719-llvm-2a0f2c5ef3330846149598220467d9f3c6e8b99c.tar.gz
bcm5719-llvm-2a0f2c5ef3330846149598220467d9f3c6e8b99c.zip
[CodeGen] Omit range checks from jump tables when lowering switches with unreachable default
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: 355490
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud