18 lines
957 B
LLVM
18 lines
957 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; 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
|
|
; 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
|
|
|
|
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64)
|
|
|
|
define i32 @bcmp8(ptr nocapture readonly %x, ptr nocapture readonly %y) {
|
|
; X64-LABEL: @bcmp8(
|
|
; X64-NEXT: [[TMP3:%.*]] = load i64, ptr [[X:%.*]], align 1
|
|
; X64-NEXT: [[TMP4:%.*]] = load i64, ptr [[Y:%.*]], align 1
|
|
; X64-NEXT: [[TMP5:%.*]] = icmp ne i64 [[TMP3]], [[TMP4]]
|
|
; X64-NEXT: [[TMP6:%.*]] = zext i1 [[TMP5]] to i32
|
|
; X64-NEXT: ret i32 [[TMP6]]
|
|
;
|
|
%call = tail call i32 @bcmp(ptr %x, ptr %y, i64 8)
|
|
ret i32 %call
|
|
}
|
|
|