64 changes: 28 additions & 36 deletions llvm/test/CodeGen/X86/or-lea.ll
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,11 @@ define i64 @or_shift1_and1_64(i64 %x, i64 %y) {
define i32 @or_and_and_rhs_neg_i32(i32 %x, i32 %y, i32 %z) {
; NOBMI-LABEL: or_and_and_rhs_neg_i32:
; NOBMI: # %bb.0: # %entry
; NOBMI-NEXT: # kill: def $esi killed $esi def $rsi
; NOBMI-NEXT: # kill: def $edx killed $edx def $rdx
; NOBMI-NEXT: xorl %edi, %edx
; NOBMI-NEXT: andl %esi, %edx
; NOBMI-NEXT: notl %esi
; NOBMI-NEXT: andl %edi, %esi
; NOBMI-NEXT: orl %edx, %esi
; NOBMI-NEXT: leal 1(%rsi), %eax
; NOBMI-NEXT: xorl %edi, %edx
; NOBMI-NEXT: leal 1(%rdx), %eax
; NOBMI-NEXT: retq
;
; BMI-LABEL: or_and_and_rhs_neg_i32:
Expand All @@ -164,12 +163,11 @@ entry:
define i32 @or_and_and_lhs_neg_i32(i32 %x, i32 %y, i32 %z) {
; NOBMI-LABEL: or_and_and_lhs_neg_i32:
; NOBMI: # %bb.0: # %entry
; NOBMI-NEXT: # kill: def $esi killed $esi def $rsi
; NOBMI-NEXT: # kill: def $edx killed $edx def $rdx
; NOBMI-NEXT: xorl %edi, %edx
; NOBMI-NEXT: andl %esi, %edx
; NOBMI-NEXT: notl %esi
; NOBMI-NEXT: andl %edi, %esi
; NOBMI-NEXT: orl %edx, %esi
; NOBMI-NEXT: leal 1(%rsi), %eax
; NOBMI-NEXT: xorl %edi, %edx
; NOBMI-NEXT: leal 1(%rdx), %eax
; NOBMI-NEXT: retq
;
; BMI-LABEL: or_and_and_lhs_neg_i32:
Expand All @@ -191,12 +189,11 @@ entry:
define i32 @or_and_rhs_neg_and_i32(i32 %x, i32 %y, i32 %z) {
; NOBMI-LABEL: or_and_rhs_neg_and_i32:
; NOBMI: # %bb.0: # %entry
; NOBMI-NEXT: # kill: def $esi killed $esi def $rsi
; NOBMI-NEXT: # kill: def $edi killed $edi def $rdi
; NOBMI-NEXT: xorl %edx, %edi
; NOBMI-NEXT: andl %esi, %edi
; NOBMI-NEXT: notl %esi
; NOBMI-NEXT: andl %edx, %esi
; NOBMI-NEXT: orl %edi, %esi
; NOBMI-NEXT: leal 1(%rsi), %eax
; NOBMI-NEXT: xorl %edx, %edi
; NOBMI-NEXT: leal 1(%rdi), %eax
; NOBMI-NEXT: retq
;
; BMI-LABEL: or_and_rhs_neg_and_i32:
Expand All @@ -218,12 +215,11 @@ entry:
define i32 @or_and_lhs_neg_and_i32(i32 %x, i32 %y, i32 %z) {
; NOBMI-LABEL: or_and_lhs_neg_and_i32:
; NOBMI: # %bb.0: # %entry
; NOBMI-NEXT: # kill: def $esi killed $esi def $rsi
; NOBMI-NEXT: # kill: def $edi killed $edi def $rdi
; NOBMI-NEXT: xorl %edx, %edi
; NOBMI-NEXT: andl %esi, %edi
; NOBMI-NEXT: notl %esi
; NOBMI-NEXT: andl %edx, %esi
; NOBMI-NEXT: orl %edi, %esi
; NOBMI-NEXT: leal 1(%rsi), %eax
; NOBMI-NEXT: xorl %edx, %edi
; NOBMI-NEXT: leal 1(%rdi), %eax
; NOBMI-NEXT: retq
;
; BMI-LABEL: or_and_lhs_neg_and_i32:
Expand All @@ -245,11 +241,10 @@ entry:
define i64 @or_and_and_rhs_neg_i64(i64 %x, i64 %y, i64 %z) {
; NOBMI-LABEL: or_and_and_rhs_neg_i64:
; NOBMI: # %bb.0: # %entry
; NOBMI-NEXT: xorq %rdi, %rdx
; NOBMI-NEXT: andq %rsi, %rdx
; NOBMI-NEXT: notq %rsi
; NOBMI-NEXT: andq %rdi, %rsi
; NOBMI-NEXT: orq %rdx, %rsi
; NOBMI-NEXT: leaq 1(%rsi), %rax
; NOBMI-NEXT: xorq %rdi, %rdx
; NOBMI-NEXT: leaq 1(%rdx), %rax
; NOBMI-NEXT: retq
;
; BMI-LABEL: or_and_and_rhs_neg_i64:
Expand All @@ -271,11 +266,10 @@ entry:
define i64 @or_and_and_lhs_neg_i64(i64 %x, i64 %y, i64 %z) {
; NOBMI-LABEL: or_and_and_lhs_neg_i64:
; NOBMI: # %bb.0: # %entry
; NOBMI-NEXT: xorq %rdi, %rdx
; NOBMI-NEXT: andq %rsi, %rdx
; NOBMI-NEXT: notq %rsi
; NOBMI-NEXT: andq %rdi, %rsi
; NOBMI-NEXT: orq %rdx, %rsi
; NOBMI-NEXT: leaq 1(%rsi), %rax
; NOBMI-NEXT: xorq %rdi, %rdx
; NOBMI-NEXT: leaq 1(%rdx), %rax
; NOBMI-NEXT: retq
;
; BMI-LABEL: or_and_and_lhs_neg_i64:
Expand All @@ -297,11 +291,10 @@ entry:
define i64 @or_and_rhs_neg_and_i64(i64 %x, i64 %y, i64 %z) {
; NOBMI-LABEL: or_and_rhs_neg_and_i64:
; NOBMI: # %bb.0: # %entry
; NOBMI-NEXT: xorq %rdx, %rdi
; NOBMI-NEXT: andq %rsi, %rdi
; NOBMI-NEXT: notq %rsi
; NOBMI-NEXT: andq %rdx, %rsi
; NOBMI-NEXT: orq %rdi, %rsi
; NOBMI-NEXT: leaq 1(%rsi), %rax
; NOBMI-NEXT: xorq %rdx, %rdi
; NOBMI-NEXT: leaq 1(%rdi), %rax
; NOBMI-NEXT: retq
;
; BMI-LABEL: or_and_rhs_neg_and_i64:
Expand All @@ -323,11 +316,10 @@ entry:
define i64 @or_and_lhs_neg_and_i64(i64 %x, i64 %y, i64 %z) {
; NOBMI-LABEL: or_and_lhs_neg_and_i64:
; NOBMI: # %bb.0: # %entry
; NOBMI-NEXT: xorq %rdx, %rdi
; NOBMI-NEXT: andq %rsi, %rdi
; NOBMI-NEXT: notq %rsi
; NOBMI-NEXT: andq %rdx, %rsi
; NOBMI-NEXT: orq %rdi, %rsi
; NOBMI-NEXT: leaq 1(%rsi), %rax
; NOBMI-NEXT: xorq %rdx, %rdi
; NOBMI-NEXT: leaq 1(%rdi), %rax
; NOBMI-NEXT: retq
;
; BMI-LABEL: or_and_lhs_neg_and_i64:
Expand Down
54 changes: 24 additions & 30 deletions llvm/test/CodeGen/X86/unfold-masked-merge-scalar-variablemask.ll
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ define i16 @out16(i16 %x, i16 %y, i16 %mask) {
define i32 @out32(i32 %x, i32 %y, i32 %mask) {
; CHECK-NOBMI-LABEL: out32:
; CHECK-NOBMI: # %bb.0:
; CHECK-NOBMI-NEXT: movl %edx, %eax
; CHECK-NOBMI-NEXT: andl %edx, %edi
; CHECK-NOBMI-NEXT: notl %eax
; CHECK-NOBMI-NEXT: andl %esi, %eax
; CHECK-NOBMI-NEXT: orl %edi, %eax
; CHECK-NOBMI-NEXT: movl %edi, %eax
; CHECK-NOBMI-NEXT: xorl %esi, %eax
; CHECK-NOBMI-NEXT: andl %edx, %eax
; CHECK-NOBMI-NEXT: xorl %esi, %eax
; CHECK-NOBMI-NEXT: retq
;
; CHECK-BMI-LABEL: out32:
Expand All @@ -81,11 +80,10 @@ define i32 @out32(i32 %x, i32 %y, i32 %mask) {
define i64 @out64(i64 %x, i64 %y, i64 %mask) {
; CHECK-NOBMI-LABEL: out64:
; CHECK-NOBMI: # %bb.0:
; CHECK-NOBMI-NEXT: movq %rdx, %rax
; CHECK-NOBMI-NEXT: andq %rdx, %rdi
; CHECK-NOBMI-NEXT: notq %rax
; CHECK-NOBMI-NEXT: andq %rsi, %rax
; CHECK-NOBMI-NEXT: orq %rdi, %rax
; CHECK-NOBMI-NEXT: movq %rdi, %rax
; CHECK-NOBMI-NEXT: xorq %rsi, %rax
; CHECK-NOBMI-NEXT: andq %rdx, %rax
; CHECK-NOBMI-NEXT: xorq %rsi, %rax
; CHECK-NOBMI-NEXT: retq
;
; CHECK-BMI-LABEL: out64:
Expand Down Expand Up @@ -628,11 +626,10 @@ define i32 @in_constant_varx_mone_invmask(i32 %x, i32 %y, i32 %mask) {
define i32 @out_constant_varx_42(i32 %x, i32 %y, i32 %mask) {
; CHECK-NOBMI-LABEL: out_constant_varx_42:
; CHECK-NOBMI: # %bb.0:
; CHECK-NOBMI-NEXT: andl %edx, %edi
; CHECK-NOBMI-NEXT: movl %edx, %eax
; CHECK-NOBMI-NEXT: notl %eax
; CHECK-NOBMI-NEXT: andl $42, %eax
; CHECK-NOBMI-NEXT: orl %edi, %eax
; CHECK-NOBMI-NEXT: movl %edi, %eax
; CHECK-NOBMI-NEXT: xorl $42, %eax
; CHECK-NOBMI-NEXT: andl %edx, %eax
; CHECK-NOBMI-NEXT: xorl $42, %eax
; CHECK-NOBMI-NEXT: retq
;
; CHECK-BMI-LABEL: out_constant_varx_42:
Expand Down Expand Up @@ -673,11 +670,10 @@ define i32 @in_constant_varx_42(i32 %x, i32 %y, i32 %mask) {
define i32 @out_constant_varx_42_invmask(i32 %x, i32 %y, i32 %mask) {
; CHECK-NOBMI-LABEL: out_constant_varx_42_invmask:
; CHECK-NOBMI: # %bb.0:
; CHECK-NOBMI-NEXT: movl %edx, %eax
; CHECK-NOBMI-NEXT: notl %eax
; CHECK-NOBMI-NEXT: andl %edi, %eax
; CHECK-NOBMI-NEXT: andl $42, %edx
; CHECK-NOBMI-NEXT: orl %edx, %eax
; CHECK-NOBMI-NEXT: movl %edi, %eax
; CHECK-NOBMI-NEXT: xorl $42, %eax
; CHECK-NOBMI-NEXT: andl %edx, %eax
; CHECK-NOBMI-NEXT: xorl %edi, %eax
; CHECK-NOBMI-NEXT: retq
;
; CHECK-BMI-LABEL: out_constant_varx_42_invmask:
Expand Down Expand Up @@ -801,11 +797,10 @@ define i32 @in_constant_mone_vary_invmask(i32 %x, i32 %y, i32 %mask) {
define i32 @out_constant_42_vary(i32 %x, i32 %y, i32 %mask) {
; CHECK-NOBMI-LABEL: out_constant_42_vary:
; CHECK-NOBMI: # %bb.0:
; CHECK-NOBMI-NEXT: movl %edx, %eax
; CHECK-NOBMI-NEXT: notl %eax
; CHECK-NOBMI-NEXT: andl $42, %edx
; CHECK-NOBMI-NEXT: andl %esi, %eax
; CHECK-NOBMI-NEXT: orl %edx, %eax
; CHECK-NOBMI-NEXT: movl %esi, %eax
; CHECK-NOBMI-NEXT: xorl $42, %eax
; CHECK-NOBMI-NEXT: andl %edx, %eax
; CHECK-NOBMI-NEXT: xorl %esi, %eax
; CHECK-NOBMI-NEXT: retq
;
; CHECK-BMI-LABEL: out_constant_42_vary:
Expand Down Expand Up @@ -844,11 +839,10 @@ define i32 @in_constant_42_vary(i32 %x, i32 %y, i32 %mask) {
define i32 @out_constant_42_vary_invmask(i32 %x, i32 %y, i32 %mask) {
; CHECK-NOBMI-LABEL: out_constant_42_vary_invmask:
; CHECK-NOBMI: # %bb.0:
; CHECK-NOBMI-NEXT: andl %edx, %esi
; CHECK-NOBMI-NEXT: movl %edx, %eax
; CHECK-NOBMI-NEXT: notl %eax
; CHECK-NOBMI-NEXT: andl $42, %eax
; CHECK-NOBMI-NEXT: orl %esi, %eax
; CHECK-NOBMI-NEXT: movl %esi, %eax
; CHECK-NOBMI-NEXT: xorl $42, %eax
; CHECK-NOBMI-NEXT: andl %edx, %eax
; CHECK-NOBMI-NEXT: xorl $42, %eax
; CHECK-NOBMI-NEXT: retq
;
; CHECK-BMI-LABEL: out_constant_42_vary_invmask:
Expand Down
2,985 changes: 1,367 additions & 1,618 deletions llvm/test/CodeGen/X86/unfold-masked-merge-vector-variablemask.ll

Large diffs are not rendered by default.