1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -expand-memcmp -memcmp-num-loads-per-block=1 -mtriple=x86_64-unknown-unknown -data-layout=e-m:o-i64:64-f80:128-n8:16:32:64-S128 < %s | FileCheck %s --check-prefix=X64
3 ; RUN: opt -S -passes=expand-memcmp -memcmp-num-loads-per-block=1 -mtriple=x86_64-unknown-unknown -data-layout=e-m:o-i64:64-f80:128-n8:16:32:64-S128 < %s | FileCheck %s --check-prefix=X64
5 declare i32 @bcmp(ptr nocapture, ptr nocapture, i64)
7 define i32 @bcmp8(ptr nocapture readonly %x, ptr nocapture readonly %y) {
9 ; X64-NEXT: [[TMP3:%.*]] = load i64, ptr [[X:%.*]], align 1
10 ; X64-NEXT: [[TMP4:%.*]] = load i64, ptr [[Y:%.*]], align 1
11 ; X64-NEXT: [[TMP5:%.*]] = icmp ne i64 [[TMP3]], [[TMP4]]
12 ; X64-NEXT: [[TMP6:%.*]] = zext i1 [[TMP5]] to i32
13 ; X64-NEXT: ret i32 [[TMP6]]
15 %call = tail call i32 @bcmp(ptr %x, ptr %y, i64 8)