[PATCH] D60859: [SimplifyCFG] remove bogus test case; NFC

Shawn Landden via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 02:44:32 PDT 2019


shawnl created this revision.
shawnl added reviewers: RKSimon, nikic.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Even if one bit is defined, the code is not clear what it is suppose to do.

See 41530


Repository:
  rL LLVM

https://reviews.llvm.org/D60859

Files:
  test/Transforms/SimplifyCFG/switch-dead-default.ll


Index: test/Transforms/SimplifyCFG/switch-dead-default.ll
===================================================================
--- test/Transforms/SimplifyCFG/switch-dead-default.ll
+++ test/Transforms/SimplifyCFG/switch-dead-default.ll
@@ -236,29 +236,4 @@
   ret void
 }
 
-;; All but one bit known undef
-;; Note: This is currently testing an optimization which doesn't trigger. The
-;; case this is protecting against is that a bit could be assumed both zero
-;; *or* one given we know it's undef.  ValueTracking doesn't do this today,
-;; but it doesn't hurt to confirm.
-define void @test8(i8 %a) {
-; CHECK-LABEL: @test8(
-; CHECK-NEXT:    unreachable
-;
-  %and = and i8 %a, 254
-  %cmp = icmp eq i8 %and, undef
-  call void @llvm.assume(i1 %cmp)
-  switch i8 %a, label %default [i8 255, label %true
-  i8 254, label %false]
-true:
-  call void @foo(i32 1)
-  ret void
-false:
-  call void @foo(i32 3)
-  ret void
-default:
-  call void @foo(i32 2)
-  ret void
-}
-
 declare void @llvm.assume(i1)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60859.195699.patch
Type: text/x-patch
Size: 1004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190418/47b036c7/attachment.bin>


More information about the llvm-commits mailing list