1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64
5 ; This tests interaction between MergeICmp and ExpandMemCmp.
7 %"struct.std::pair" = type { i32, i32 }
9 define zeroext i1 @opeq1(
11 ; X86: # %bb.0: # %"entry+land.rhs.i"
12 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
13 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
14 ; X86-NEXT: movl (%ecx), %edx
15 ; X86-NEXT: movl 4(%ecx), %ecx
16 ; X86-NEXT: xorl (%eax), %edx
17 ; X86-NEXT: xorl 4(%eax), %ecx
18 ; X86-NEXT: orl %edx, %ecx
23 ; X64: # %bb.0: # %"entry+land.rhs.i"
24 ; X64-NEXT: movq (%rdi), %rax
25 ; X64-NEXT: cmpq (%rsi), %rax
28 ptr nocapture readonly dereferenceable(8) %a,
29 ptr nocapture readonly dereferenceable(8) %b) local_unnamed_addr nofree nosync {
31 %0 = load i32, ptr %a, align 4
32 %1 = load i32, ptr %b, align 4
33 %cmp.i = icmp eq i32 %0, %1
34 br i1 %cmp.i, label %land.rhs.i, label %opeq1.exit
37 %second.i = getelementptr inbounds %"struct.std::pair", ptr %a, i64 0, i32 1
38 %2 = load i32, ptr %second.i, align 4
39 %second2.i = getelementptr inbounds %"struct.std::pair", ptr %b, i64 0, i32 1
40 %3 = load i32, ptr %second2.i, align 4
41 %cmp3.i = icmp eq i32 %2, %3
45 %4 = phi i1 [ false, %entry ], [ %cmp3.i, %land.rhs.i ]