move PR6576 here.
authorChris Lattner <sabre@nondot.org>
Wed, 10 Mar 2010 21:42:42 +0000 (21:42 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 10 Mar 2010 21:42:42 +0000 (21:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98194 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index 4fd46a8b28ad2fec820098ef8829f5df015dcd57..052a5756da9faafdd4b97653c36fadb00cc76048 100644 (file)
@@ -1819,3 +1819,27 @@ int test2(int mainType, int subType) {
 }
 
 //===---------------------------------------------------------------------===//
+
+The following test case (from PR6576):
+
+define i32 @mul(i32 %a, i32 %b) nounwind readnone {
+entry:
+ %cond1 = icmp eq i32 %b, 0                      ; <i1> [#uses=1]
+ br i1 %cond1, label %exit, label %bb.nph
+bb.nph:                                           ; preds = %entry
+ %tmp = mul i32 %b, %a                           ; <i32> [#uses=1]
+ ret i32 %tmp
+exit:                                             ; preds = %entry
+ ret i32 0
+}
+
+could be reduced to:
+
+define i32 @mul(i32 %a, i32 %b) nounwind readnone {
+entry:
+ %tmp = mul i32 %b, %a
+ ret i32 %tmp
+}
+
+//===---------------------------------------------------------------------===//
+