llvm/llvm/test/CodeGen/SystemZ/ctpop-04.ll

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; Test 128-bit arithmetic in vector registers on z14
;
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s

declare i128 @llvm.ctpop.i128(i128)

define i128 @f1(i128 %a) {
; CHECK-LABEL: f1:
; CHECK:       # %bb.0:
; CHECK-NEXT:    vl %v0, 0(%r3), 3
; CHECK-NEXT:    vpopctg %v0, %v0
; CHECK-NEXT:    vgbm %v1, 0
; CHECK-NEXT:    vsumqg %v0, %v0, %v1
; CHECK-NEXT:    vst %v0, 0(%r2), 3
; CHECK-NEXT:    br %r14
  %res = tail call i128 @llvm.ctpop.i128(i128 %a)
  ret i128 %res
}