[llvm] r303659 - [InstCombine] Use update_test_checks to regenerate the ctpop test. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 10:20:18 PDT 2017


Author: ctopper
Date: Tue May 23 12:20:18 2017
New Revision: 303659

URL: http://llvm.org/viewvc/llvm-project?rev=303659&view=rev
Log:
[InstCombine] Use update_test_checks to regenerate the ctpop test. NFC

Modified:
    llvm/trunk/test/Transforms/InstCombine/ctpop.ll

Modified: llvm/trunk/test/Transforms/InstCombine/ctpop.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/ctpop.ll?rev=303659&r1=303658&r2=303659&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/ctpop.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/ctpop.ll Tue May 23 12:20:18 2017
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -S -instcombine | FileCheck %s
 
 declare i32 @llvm.ctpop.i32(i32)
@@ -5,8 +6,9 @@ declare i8 @llvm.ctpop.i8(i8)
 declare void @llvm.assume(i1)
 
 define i1 @test1(i32 %arg) {
-; CHECK: @test1
-; CHECK: ret i1 false
+; CHECK-LABEL: @test1(
+; CHECK-NEXT:    ret i1 false
+;
   %and = and i32 %arg, 15
   %cnt = call i32 @llvm.ctpop.i32(i32 %and)
   %res = icmp eq i32 %cnt, 9
@@ -14,8 +16,9 @@ define i1 @test1(i32 %arg) {
 }
 
 define i1 @test2(i32 %arg) {
-; CHECK: @test2
-; CHECK: ret i1 false
+; CHECK-LABEL: @test2(
+; CHECK-NEXT:    ret i1 false
+;
   %and = and i32 %arg, 1
   %cnt = call i32 @llvm.ctpop.i32(i32 %and)
   %res = icmp eq i32 %cnt, 2
@@ -23,9 +26,12 @@ define i1 @test2(i32 %arg) {
 }
 
 define i1 @test3(i32 %arg) {
-; CHECK: @test3
-; CHECK: ret i1 false
-  ;; Use an assume to make all the bits known without triggering constant 
+; CHECK-LABEL: @test3(
+; CHECK-NEXT:    [[ASSUME:%.*]] = icmp eq i32 [[ARG:%.*]], 0
+; CHECK-NEXT:    call void @llvm.assume(i1 [[ASSUME]])
+; CHECK-NEXT:    ret i1 false
+;
+  ;; Use an assume to make all the bits known without triggering constant
   ;; folding.  This is trying to hit a corner case where we have to avoid
   ;; taking the log of 0.
   %assume = icmp eq i32 %arg, 0
@@ -37,8 +43,11 @@ define i1 @test3(i32 %arg) {
 
 ; Negative test for when we know nothing
 define i1 @test4(i8 %arg) {
-; CHECK: @test4
-; CHECK: ret i1 %res
+; CHECK-LABEL: @test4(
+; CHECK-NEXT:    [[CNT:%.*]] = call i8 @llvm.ctpop.i8(i8 [[ARG:%.*]])
+; CHECK-NEXT:    [[RES:%.*]] = icmp eq i8 [[CNT]], 2
+; CHECK-NEXT:    ret i1 [[RES]]
+;
   %cnt = call i8 @llvm.ctpop.i8(i8 %arg)
   %res = icmp eq i8 %cnt, 2
   ret i1 %res




More information about the llvm-commits mailing list