Files
clang-p2996/llvm/test/Transforms/InstCombine/vector-logical-reductions.ll
Nikita Popov 2caaec65c0 [InstCombine] Regenerate all test checks (NFC)
Due to an improvement to name preservation, a lot of InstCombine
tests now show spurious diffs when regenerated.

Rather than regenerating individual files when they get touched,
mass-regenerate all UTC-based InstCombine tests. I have then reset
a number of files showing suspicious diffs where the UTC output
has clearly been manually adjusted. I apologize if I missed
anything in the mass of changes.
2023-04-06 18:38:11 +02:00

26 lines
842 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
define i1 @reduction_logical_or(<4 x i1> %x) {
; CHECK-LABEL: @reduction_logical_or(
; CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i1> [[X:%.*]] to i4
; CHECK-NEXT: [[R:%.*]] = icmp ne i4 [[TMP1]], 0
; CHECK-NEXT: ret i1 [[R]]
;
%r = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> %x)
ret i1 %r
}
define i1 @reduction_logical_and(<4 x i1> %x) {
; CHECK-LABEL: @reduction_logical_and(
; CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i1> [[X:%.*]] to i4
; CHECK-NEXT: [[R:%.*]] = icmp eq i4 [[TMP1]], -1
; CHECK-NEXT: ret i1 [[R]]
;
%r = call i1 @llvm.vector.reduce.and.v4i1(<4 x i1> %x)
ret i1 %r
}
declare i1 @llvm.vector.reduce.or.v4i1(<4 x i1>)
declare i1 @llvm.vector.reduce.and.v4i1(<4 x i1>)