[llvm] aeff03d - [InstCombine] Regenerate 2010-11-23-Distributed.ll tests

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 08:41:40 PDT 2021


Author: Simon Pilgrim
Date: 2021-04-09T16:40:18+01:00
New Revision: aeff03d2df541d417ba216cec9f35c3eace39573

URL: https://github.com/llvm/llvm-project/commit/aeff03d2df541d417ba216cec9f35c3eace39573
DIFF: https://github.com/llvm/llvm-project/commit/aeff03d2df541d417ba216cec9f35c3eace39573.diff

LOG: [InstCombine] Regenerate 2010-11-23-Distributed.ll tests

Added: 
    

Modified: 
    llvm/test/Transforms/InstCombine/2010-11-23-Distributed.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstCombine/2010-11-23-Distributed.ll b/llvm/test/Transforms/InstCombine/2010-11-23-Distributed.ll
index 20bfed87798b..3b26ba73ac31 100644
--- a/llvm/test/Transforms/InstCombine/2010-11-23-Distributed.ll
+++ b/llvm/test/Transforms/InstCombine/2010-11-23-Distributed.ll
@@ -1,23 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -instcombine -S | FileCheck %s
+
 define i32 @foo(i32 %x, i32 %y) {
 ; CHECK-LABEL: @foo(
+; CHECK-NEXT:    [[RES:%.*]] = mul i32 [[X:%.*]], [[Y:%.*]]
+; CHECK-NEXT:    ret i32 [[RES]]
+;
   %add = add nsw i32 %y, %x
   %mul = mul nsw i32 %add, %y
   %square = mul nsw i32 %y, %y
   %res = sub i32 %mul, %square
   ret i32 %res
-; CHECK-NEXT: mul i32 %x, %y
-; CHECK-NEXT: ret i32
 }
 
 define i1 @bar(i64 %x, i64 %y) {
 ; CHECK-LABEL: @bar(
+; CHECK-NEXT:    [[TMP1:%.*]] = xor i64 [[X:%.*]], -1
+; CHECK-NEXT:    [[B:%.*]] = and i64 [[TMP1]], [[Y:%.*]]
+; CHECK-NEXT:    [[R:%.*]] = icmp eq i64 [[B]], 0
+; CHECK-NEXT:    ret i1 [[R]]
+;
   %a = and i64 %y, %x
-; CHECK: and
-; CHECK-NOT: and
   %not = xor i64 %a, -1
   %b = and i64 %y, %not
   %r = icmp eq i64 %b, 0
   ret i1 %r
-; CHECK: ret i1
 }


        


More information about the llvm-commits mailing list