define i4 @scalar (i4 %x, i4 %y, i4 %m) {
; CHECK-LABEL: @scalar(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[X]]
; CHECK-NEXT: ret i4 [[R]]
;
%im = xor i4 %m, -1
define i4 @in_constant_varx_6_invmask(i4 %x, i4 %mask) {
; CHECK-LABEL: @in_constant_varx_6_invmask(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor i4 [[MASK:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[X:%.*]], 6
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], 6
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[X]]
; CHECK-NEXT: ret i4 [[R]]
;
%notmask = xor i4 %mask, -1
define i4 @in_constant_6_vary_invmask(i4 %y, i4 %mask) {
; CHECK-LABEL: @in_constant_6_vary_invmask(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor i4 [[MASK:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[Y:%.*]], 6
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], 6
; CHECK-NEXT: ret i4 [[R]]
;
%notmask = xor i4 %mask, -1
define i4 @c_1_0_0 (i4 %x, i4 %y, i4 %m) {
; CHECK-LABEL: @c_1_0_0(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[Y:%.*]], [[X:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[X]]
; CHECK-NEXT: ret i4 [[R]]
;
%im = xor i4 %m, -1
define i4 @c_0_1_0 (i4 %x, i4 %y, i4 %m) {
; CHECK-LABEL: @c_0_1_0(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], [[X]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[Y]]
; CHECK-NEXT: ret i4 [[R]]
;
%im = xor i4 %m, -1
define i4 @c_0_0_1 (i4 %m) {
; CHECK-LABEL: @c_0_0_1(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[X:%.*]] = call i4 @gen4()
; CHECK-NEXT: [[Y:%.*]] = call i4 @gen4()
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[X]], [[Y]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[Y]], [[N1]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[X]]
; CHECK-NEXT: ret i4 [[R]]
;
%im = xor i4 %m, -1
define i4 @c_1_1_0 (i4 %x, i4 %y, i4 %m) {
; CHECK-LABEL: @c_1_1_0(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[Y:%.*]], [[X:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], [[X]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[Y]]
; CHECK-NEXT: ret i4 [[R]]
;
%im = xor i4 %m, -1
define i4 @c_1_0_1 (i4 %x, i4 %m) {
; CHECK-LABEL: @c_1_0_1(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[Y:%.*]] = call i4 @gen4()
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[Y]], [[X:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[Y]], [[N1]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[X]]
; CHECK-NEXT: ret i4 [[R]]
;
%im = xor i4 %m, -1
define i4 @c_0_1_1 (i4 %y, i4 %m) {
; CHECK-LABEL: @c_0_1_1(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[X:%.*]] = call i4 @gen4()
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[X]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[X]], [[N1]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[Y]]
; CHECK-NEXT: ret i4 [[R]]
;
%im = xor i4 %m, -1
define i4 @c_1_1_1 (i4 %m) {
; CHECK-LABEL: @c_1_1_1(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[X:%.*]] = call i4 @gen4()
; CHECK-NEXT: [[Y:%.*]] = call i4 @gen4()
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[Y]], [[X]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[X]], [[N1]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[Y]]
; CHECK-NEXT: ret i4 [[R]]
;
%im = xor i4 %m, -1
define i4 @commutativity_constant_varx_6_invmask(i4 %x, i4 %mask) {
; CHECK-LABEL: @commutativity_constant_varx_6_invmask(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor i4 [[MASK:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[X:%.*]], 6
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], 6
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[X]]
; CHECK-NEXT: ret i4 [[R]]
;
%notmask = xor i4 %mask, -1
define i4 @commutativity_constant_6_vary_invmask(i4 %y, i4 %mask) {
; CHECK-LABEL: @commutativity_constant_6_vary_invmask(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor i4 [[MASK:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[Y:%.*]], 6
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], 6
; CHECK-NEXT: ret i4 [[R]]
;
%notmask = xor i4 %mask, -1
define i4 @n_oneuse_D_is_ok (i4 %x, i4 %y, i4 %m) {
; CHECK-LABEL: @n_oneuse_D_is_ok(
-; CHECK-NEXT: [[IM:%.*]] = xor i4 [[M:%.*]], -1
; CHECK-NEXT: [[N0:%.*]] = xor i4 [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and i4 [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor i4 [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and i4 [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor i4 [[TMP1]], [[X]]
; CHECK-NEXT: call void @use4(i4 [[N0]])
; CHECK-NEXT: ret i4 [[R]]
;
define <2 x i4> @vector (<2 x i4> %x, <2 x i4> %y, <2 x i4> %m) {
; CHECK-LABEL: @vector(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%im = xor <2 x i4> %m, <i4 -1, i4 -1>
define <3 x i4> @vector_undef (<3 x i4> %x, <3 x i4> %y, <3 x i4> %m) {
; CHECK-LABEL: @vector_undef(
-; CHECK-NEXT: [[IM:%.*]] = xor <3 x i4> [[M:%.*]], <i4 -1, i4 undef, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <3 x i4> [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and <3 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <3 x i4> [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <3 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <3 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <3 x i4> [[R]]
;
%im = xor <3 x i4> %m, <i4 -1, i4 undef, i4 -1>
define <2 x i4> @in_constant_varx_6_invmask(<2 x i4> %x, <2 x i4> %mask) {
; CHECK-LABEL: @in_constant_varx_6_invmask(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor <2 x i4> [[MASK:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[X:%.*]], <i4 6, i4 6>
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], <i4 6, i4 6>
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%notmask = xor <2 x i4> %mask, <i4 -1, i4 -1>
define <2 x i4> @in_constant_varx_6_invmask_nonsplat(<2 x i4> %x, <2 x i4> %mask) {
; CHECK-LABEL: @in_constant_varx_6_invmask_nonsplat(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor <2 x i4> [[MASK:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[X:%.*]], <i4 6, i4 7>
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], <i4 6, i4 7>
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%notmask = xor <2 x i4> %mask, <i4 -1, i4 -1>
define <3 x i4> @in_constant_varx_6_invmask_undef(<3 x i4> %x, <3 x i4> %mask) {
; CHECK-LABEL: @in_constant_varx_6_invmask_undef(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor <3 x i4> [[MASK:%.*]], <i4 -1, i4 undef, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <3 x i4> [[X:%.*]], <i4 6, i4 undef, i4 7>
-; CHECK-NEXT: [[N1:%.*]] = and <3 x i4> [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor <3 x i4> [[N1]], <i4 6, i4 undef, i4 7>
+; CHECK-NEXT: [[TMP1:%.*]] = and <3 x i4> [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <3 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <3 x i4> [[R]]
;
%notmask = xor <3 x i4> %mask, <i4 -1, i4 undef, i4 -1>
define <2 x i4> @in_constant_6_vary_invmask(<2 x i4> %y, <2 x i4> %mask) {
; CHECK-LABEL: @in_constant_6_vary_invmask(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor <2 x i4> [[MASK:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[Y:%.*]], <i4 6, i4 6>
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], <i4 6, i4 6>
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%notmask = xor <2 x i4> %mask, <i4 -1, i4 -1>
define <2 x i4> @in_constant_6_vary_invmask_nonsplat(<2 x i4> %y, <2 x i4> %mask) {
; CHECK-LABEL: @in_constant_6_vary_invmask_nonsplat(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor <2 x i4> [[MASK:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[Y:%.*]], <i4 6, i4 7>
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], <i4 6, i4 7>
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%notmask = xor <2 x i4> %mask, <i4 -1, i4 -1>
define <3 x i4> @in_constant_6_vary_invmask_undef(<3 x i4> %y, <3 x i4> %mask) {
; CHECK-LABEL: @in_constant_6_vary_invmask_undef(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor <3 x i4> [[MASK:%.*]], <i4 -1, i4 undef, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <3 x i4> [[Y:%.*]], <i4 6, i4 undef, i4 6>
-; CHECK-NEXT: [[N1:%.*]] = and <3 x i4> [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor <3 x i4> [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <3 x i4> [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <3 x i4> [[TMP1]], <i4 6, i4 undef, i4 6>
; CHECK-NEXT: ret <3 x i4> [[R]]
;
%notmask = xor <3 x i4> %mask, <i4 -1, i4 undef, i4 -1>
define <2 x i4> @c_1_0_0 (<2 x i4> %x, <2 x i4> %y, <2 x i4> %m) {
; CHECK-LABEL: @c_1_0_0(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[Y:%.*]], [[X:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%im = xor <2 x i4> %m, <i4 -1, i4 -1>
define <2 x i4> @c_0_1_0 (<2 x i4> %x, <2 x i4> %y, <2 x i4> %m) {
; CHECK-LABEL: @c_0_1_0(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], [[X]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[Y]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%im = xor <2 x i4> %m, <i4 -1, i4 -1>
define <2 x i4> @c_0_0_1 (<2 x i4> %m) {
; CHECK-LABEL: @c_0_0_1(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[X:%.*]] = call <2 x i4> @gen4()
; CHECK-NEXT: [[Y:%.*]] = call <2 x i4> @gen4()
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[X]], [[Y]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[Y]], [[N1]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%im = xor <2 x i4> %m, <i4 -1, i4 -1>
define <2 x i4> @c_1_1_0 (<2 x i4> %x, <2 x i4> %y, <2 x i4> %m) {
; CHECK-LABEL: @c_1_1_0(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[Y:%.*]], [[X:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], [[X]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[Y]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%im = xor <2 x i4> %m, <i4 -1, i4 -1>
define <2 x i4> @c_1_0_1 (<2 x i4> %x, <2 x i4> %m) {
; CHECK-LABEL: @c_1_0_1(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[Y:%.*]] = call <2 x i4> @gen4()
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[Y]], [[X:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[Y]], [[N1]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%im = xor <2 x i4> %m, <i4 -1, i4 -1>
define <2 x i4> @c_0_1_1 (<2 x i4> %y, <2 x i4> %m) {
; CHECK-LABEL: @c_0_1_1(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[X:%.*]] = call <2 x i4> @gen4()
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[X]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[X]], [[N1]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[Y]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%im = xor <2 x i4> %m, <i4 -1, i4 -1>
define <2 x i4> @c_1_1_1 (<2 x i4> %m) {
; CHECK-LABEL: @c_1_1_1(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[X:%.*]] = call <2 x i4> @gen4()
; CHECK-NEXT: [[Y:%.*]] = call <2 x i4> @gen4()
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[Y]], [[X]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[X]], [[N1]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[Y]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%im = xor <2 x i4> %m, <i4 -1, i4 -1>
define <2 x i4> @commutativity_constant_varx_6_invmask(<2 x i4> %x, <2 x i4> %mask) {
; CHECK-LABEL: @commutativity_constant_varx_6_invmask(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor <2 x i4> [[MASK:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[X:%.*]], <i4 6, i4 6>
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], <i4 6, i4 6>
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%notmask = xor <2 x i4> %mask, <i4 -1, i4 -1>
define <2 x i4> @commutativity_constant_6_vary_invmask(<2 x i4> %y, <2 x i4> %mask) {
; CHECK-LABEL: @commutativity_constant_6_vary_invmask(
-; CHECK-NEXT: [[NOTMASK:%.*]] = xor <2 x i4> [[MASK:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[Y:%.*]], <i4 6, i4 6>
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[NOTMASK]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[MASK:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], <i4 6, i4 6>
; CHECK-NEXT: ret <2 x i4> [[R]]
;
%notmask = xor <2 x i4> %mask, <i4 -1, i4 -1>
define <2 x i4> @n_oneuse_D_is_ok (<2 x i4> %x, <2 x i4> %y, <2 x i4> %m) {
; CHECK-LABEL: @n_oneuse_D_is_ok(
-; CHECK-NEXT: [[IM:%.*]] = xor <2 x i4> [[M:%.*]], <i4 -1, i4 -1>
; CHECK-NEXT: [[N0:%.*]] = xor <2 x i4> [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[N1:%.*]] = and <2 x i4> [[N0]], [[IM]]
-; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[N1]], [[Y]]
+; CHECK-NEXT: [[TMP1:%.*]] = and <2 x i4> [[N0]], [[M:%.*]]
+; CHECK-NEXT: [[R:%.*]] = xor <2 x i4> [[TMP1]], [[X]]
; CHECK-NEXT: call void @use4(<2 x i4> [[N0]])
; CHECK-NEXT: ret <2 x i4> [[R]]
;