[llvm] r275187 - auto-generate checks

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 09:17:30 PDT 2016


Author: spatel
Date: Tue Jul 12 11:17:30 2016
New Revision: 275187

URL: http://llvm.org/viewvc/llvm-project?rev=275187&view=rev
Log:
auto-generate checks

Modified:
    llvm/trunk/test/Transforms/InstCombine/demorgan-zext.ll

Modified: llvm/trunk/test/Transforms/InstCombine/demorgan-zext.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/demorgan-zext.ll?rev=275187&r1=275186&r2=275187&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/demorgan-zext.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/demorgan-zext.ll Tue Jul 12 11:17:30 2016
@@ -1,34 +1,35 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -instcombine -S | FileCheck %s
 
 ; PR22723: Recognize De Morgan's Laws when obfuscated by zexts.
 
 define i32 @demorgan_or(i1 %X, i1 %Y) {
+; CHECK-LABEL: @demorgan_or(
+; CHECK-NEXT:    [[OR_DEMORGAN:%.*]] = and i1 %X, %Y
+; CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[OR_DEMORGAN]] to i32
+; CHECK-NEXT:    [[OR:%.*]] = xor i32 [[TMP1]], 1
+; CHECK-NEXT:    ret i32 [[OR]]
+;
   %zextX = zext i1 %X to i32
   %zextY = zext i1 %Y to i32
   %notX  = xor i32 %zextX, 1
   %notY  = xor i32 %zextY, 1
   %or    = or i32 %notX, %notY
   ret i32 %or
-
-; CHECK-LABEL: demorgan_or(
-; CHECK-NEXT:  %[[AND:.*]] = and i1 %X, %Y
-; CHECK-NEXT:  %[[ZEXT:.*]] = zext i1 %[[AND]] to i32
-; CHECK-NEXT:  %[[XOR:.*]] = xor i32 %[[ZEXT]], 1
-; CHECK-NEXT:  ret i32 %[[XOR]]
 }
 
 define i32 @demorgan_and(i1 %X, i1 %Y) {
+; CHECK-LABEL: @demorgan_and(
+; CHECK-NEXT:    [[AND_DEMORGAN:%.*]] = or i1 %X, %Y
+; CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[AND_DEMORGAN]] to i32
+; CHECK-NEXT:    [[AND:%.*]] = xor i32 [[TMP1]], 1
+; CHECK-NEXT:    ret i32 [[AND]]
+;
   %zextX = zext i1 %X to i32
   %zextY = zext i1 %Y to i32
   %notX  = xor i32 %zextX, 1
   %notY  = xor i32 %zextY, 1
   %and   = and i32 %notX, %notY
   ret i32 %and
-
-; CHECK-LABEL: demorgan_and(
-; CHECK-NEXT:  %[[OR:.*]] = or i1 %X, %Y
-; CHECK-NEXT:  %[[ZEXT:.*]] = zext i1 %[[OR]] to i32
-; CHECK-NEXT:  %[[XOR:.*]] = xor i32 %[[ZEXT]], 1
-; CHECK-NEXT:  ret i32 %[[XOR]]
 }
 




More information about the llvm-commits mailing list