blob: b060b94e01d69d89bbc871a3bbb1a367e24f0572 [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes=reassociate -S %s | FileCheck %s
define i16 @or_disjoint_both(i16 %a, i16 %b) {
; CHECK-LABEL: @or_disjoint_both(
; CHECK-NEXT: [[OR_1:%.*]] = or disjoint i16 [[A:%.*]], 1
; CHECK-NEXT: [[OR_2:%.*]] = or disjoint i16 [[OR_1]], [[B:%.*]]
; CHECK-NEXT: ret i16 [[OR_2]]
;
%or.1 = or disjoint i16 %b, %a
%or.2 = or disjoint i16 %or.1, 1
ret i16 %or.2
}
define i16 @or_disjoint_first(i16 %a, i16 %b) {
; CHECK-LABEL: @or_disjoint_first(
; CHECK-NEXT: [[OR_1:%.*]] = or i16 [[A:%.*]], 1
; CHECK-NEXT: [[OR_2:%.*]] = or i16 [[OR_1]], [[B:%.*]]
; CHECK-NEXT: ret i16 [[OR_2]]
;
%or.1 = or i16 %b, %a
%or.2 = or disjoint i16 %or.1, 1
ret i16 %or.2
}
define i16 @or_disjoint_last(i16 %a, i16 %b) {
; CHECK-LABEL: @or_disjoint_last(
; CHECK-NEXT: [[OR_1:%.*]] = or i16 [[A:%.*]], 1
; CHECK-NEXT: [[OR_2:%.*]] = or i16 [[OR_1]], [[B:%.*]]
; CHECK-NEXT: ret i16 [[OR_2]]
;
%or.1 = or disjoint i16 %b, %a
%or.2 = or i16 %or.1, 1
ret i16 %or.2
}