[PATCH] D122485: [SimplifyCFG] Fold mutil cases to And mask
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 06:09:44 PDT 2022
bcl5980 added a comment.
In D122485#3448240 <https://reviews.llvm.org/D122485#3448240>, @spatel wrote:
> Let's add the baseline tests as an NFC commit now, so it is easier to see the diffs.
>
> The order of the transforms creates an interesting trade-off, so we need a test like this (and probably even more tests):
>
> define i8 @same_value_two_case(i32 %i) {
> entry:
> switch i32 %i, label %default [
> i32 -3, label %end
> i32 5, label %end
> ]
>
> default:
> br label %end
>
> end:
> %t0 = phi i8 [ 42, %default ], [ 3, %entry ], [ 3, %entry ]
> ret i8 %t0
> }
I'm sorry but what's the difference between this test with switch_to_and0 ? For the negative offset?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122485/new/
https://reviews.llvm.org/D122485
More information about the llvm-commits
mailing list