[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyCFG/DeadSetCC.ll
Chris Lattner
lattner at cs.uiuc.edu
Sat Jan 1 08:01:08 PST 2005
Changes in directory llvm/test/Regression/Transforms/SimplifyCFG:
DeadSetCC.ll added (r1.1)
---
Log message:
Add new test to make sure simplifycfg doesn't leave around trivially
dead instructions.
---
Diffs of the changes: (+26 -0)
Index: llvm/test/Regression/Transforms/SimplifyCFG/DeadSetCC.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyCFG/DeadSetCC.ll:1.1
*** /dev/null Sat Jan 1 10:01:06 2005
--- llvm/test/Regression/Transforms/SimplifyCFG/DeadSetCC.ll Sat Jan 1 10:00:56 2005
***************
*** 0 ****
--- 1,26 ----
+ ; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep seteq
+
+ ; Check that simplifycfg deletes a dead 'seteq' instruction when it
+ ; folds a conditional branch into a switch instruction.
+
+ declare void %foo()
+ declare void %bar()
+
+ void %testcfg(uint %V) {
+ %C = seteq uint %V, 18
+ %D = seteq uint %V, 180
+ %E = or bool %C, %D
+ br bool %E, label %L1, label %Sw
+ Sw:
+ switch uint %V, label %L1 [
+ uint 15, label %L2
+ uint 16, label %L2
+ ]
+ L1:
+ call void %foo()
+ ret void
+ L2:
+ call void %bar()
+ ret void
+ }
+
More information about the llvm-commits
mailing list