1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[NFC] run specific pass instead of whole -O3 pipeline for popcount recoginzation testcase.

llvm-svn: 374514
This commit is contained in:
Chen Zheng 2019-10-11 05:30:18 +00:00
parent 93ed92389c
commit 0ead3f1cb2

View File

@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -O3 < %s -instcombine -S | FileCheck %s
; RUN: opt < %s -aggressive-instcombine -S | FileCheck %s
;int popcount8(unsigned char i) {
; i = i - ((i >> 1) & 0x55);
@ -44,7 +44,7 @@ define signext i32 @popcount8(i8 zeroext %0) {
;}
define signext i32 @popcount32(i32 zeroext %0) {
; CHECK-LABEL: @popcount32(
; CHECK-NEXT: [[TMP2:%.*]] = tail call i32 @llvm.ctpop.i32(i32 [[TMP0:%.*]]), !range !0
; CHECK-NEXT: [[TMP2:%.*]] = call i32 @llvm.ctpop.i32(i32 [[TMP0:%.*]])
; CHECK-NEXT: ret i32 [[TMP2]]
;
%2 = lshr i32 %0, 1
@ -70,7 +70,7 @@ define signext i32 @popcount32(i32 zeroext %0) {
;}
define signext i32 @popcount64(i64 %0) {
; CHECK-LABEL: @popcount64(
; CHECK-NEXT: [[TMP2:%.*]] = tail call i64 @llvm.ctpop.i64(i64 [[TMP0:%.*]]), !range !1
; CHECK-NEXT: [[TMP2:%.*]] = call i64 @llvm.ctpop.i64(i64 [[TMP0:%.*]])
; CHECK-NEXT: [[TMP3:%.*]] = trunc i64 [[TMP2]] to i32
; CHECK-NEXT: ret i32 [[TMP3]]
;
@ -111,7 +111,7 @@ define signext i32 @popcount64(i64 %0) {
;}
define signext i32 @popcount128(i128 %0) {
; CHECK-LABEL: @popcount128(
; CHECK-NEXT: [[TMP2:%.*]] = tail call i128 @llvm.ctpop.i128(i128 [[TMP0:%.*]]), !range !2
; CHECK-NEXT: [[TMP2:%.*]] = call i128 @llvm.ctpop.i128(i128 [[TMP0:%.*]])
; CHECK-NEXT: [[TMP3:%.*]] = trunc i128 [[TMP2]] to i32
; CHECK-NEXT: ret i32 [[TMP3]]
;
@ -174,7 +174,7 @@ define <16 x i8> @popcount8vec(<16 x i8> %0) {
;}
define <4 x i32> @popcount32vec(<4 x i32> %0) {
; CHECK-LABEL: @popcount32vec(
; CHECK-NEXT: [[TMP2:%.*]] = tail call <4 x i32> @llvm.ctpop.v4i32(<4 x i32> [[TMP0:%.*]])
; CHECK-NEXT: [[TMP2:%.*]] = call <4 x i32> @llvm.ctpop.v4i32(<4 x i32> [[TMP0:%.*]])
; CHECK-NEXT: ret <4 x i32> [[TMP2]]
;
%2 = lshr <4 x i32> %0, <i32 1, i32 1, i32 1, i32 1>