Revert "[CVP] processSwitch: Remove default case when switch cover all possible values."
authorSanjay Patel <spatel@rotateright.com>
Thu, 19 Aug 2021 12:43:51 +0000 (08:43 -0400)
committerSanjay Patel <spatel@rotateright.com>
Thu, 19 Aug 2021 12:43:51 +0000 (08:43 -0400)
commitec54e275f56cc042eb9c25acd76bff18b9ea8092
tree659470bb2250d1ca738bc23f9c1ce232b5fcc444
parenteee0ded3371f549ba6df045c0348e8e32d576df9
Revert "[CVP] processSwitch: Remove default case when switch cover all possible values."

This reverts commit 9934a5b2ed5aa6e6bbb2e55c3cd98839722c226e.
This patch may cause miscompiles because it missed a constraint
as shown in the examples from:
https://llvm.org/PR51531
llvm/include/llvm/Transforms/Utils/Local.h
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/CorrelatedValuePropagation/basic.ll