blob: e2e8edad685b4e55c3d3db8cdb4b81f38c341041 [file]
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
define i1 @test(i16 %a) {
; CHECK-LABEL: define i1 @test(
; CHECK-SAME: i16 [[A:%.*]]) {
; CHECK-NEXT: [[ENTRY:.*:]]
; CHECK-NEXT: [[AND:%.*]] = and i16 [[A]], 0
; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i16 [[AND]], 0
; CHECK-NEXT: [[XOR:%.*]] = xor i16 [[AND]], 0
; CHECK-NEXT: [[CMP:%.*]] = icmp sge i16 [[XOR]], [[XOR]]
; CHECK-NEXT: ret i1 [[CMP]]
;
entry:
%and = and i16 %a, 0
%tobool = icmp ne i16 %and, 0
%xor = xor i16 %and, 0
%cmp = icmp sge i16 %xor, %xor
ret i1 %cmp
}