brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 2059b8f Raw
109 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-unknown               | FileCheck %s3 4@.str1 = private constant [4 x i8] c"\00\00\00\00", align 15@.str2 = private constant [4 x i8] c"\ff\ff\ff\ff", align 16 7declare i32 @memcmp(ptr, ptr, i64)8 9define i32 @length4_same() nounwind {10; CHECK-LABEL: length4_same:11; CHECK:       # %bb.0:12; CHECK-NEXT:    xorl %eax, %eax13; CHECK-NEXT:    retq14  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind15  ret i32 %m16}17 18define i1 @length4_same_lt() nounwind {19; CHECK-LABEL: length4_same_lt:20; CHECK:       # %bb.0:21; CHECK-NEXT:    xorl %eax, %eax22; CHECK-NEXT:    retq23  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind24  %c = icmp slt i32 %m, 025  ret i1 %c26}27 28define i1 @length4_same_gt() nounwind {29; CHECK-LABEL: length4_same_gt:30; CHECK:       # %bb.0:31; CHECK-NEXT:    xorl %eax, %eax32; CHECK-NEXT:    retq33  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind34  %c = icmp sgt i32 %m, 035  ret i1 %c36}37 38define i1 @length4_same_le() nounwind {39; CHECK-LABEL: length4_same_le:40; CHECK:       # %bb.0:41; CHECK-NEXT:    movb $1, %al42; CHECK-NEXT:    retq43  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind44  %c = icmp sle i32 %m, 045  ret i1 %c46}47 48define i1 @length4_same_ge() nounwind {49; CHECK-LABEL: length4_same_ge:50; CHECK:       # %bb.0:51; CHECK-NEXT:    movb $1, %al52; CHECK-NEXT:    retq53  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind54  %c = icmp sge i32 %m, 055  ret i1 %c56}57 58 59define i32 @length4() nounwind {60; CHECK-LABEL: length4:61; CHECK:       # %bb.0:62; CHECK-NEXT:    movl $-1, %eax63; CHECK-NEXT:    retq64  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind65  ret i32 %m66}67 68define i1 @length4_lt() nounwind {69; CHECK-LABEL: length4_lt:70; CHECK:       # %bb.0:71; CHECK-NEXT:    movb $1, %al72; CHECK-NEXT:    retq73  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind74  %c = icmp slt i32 %m, 075  ret i1 %c76}77 78define i1 @length4_gt() nounwind {79; CHECK-LABEL: length4_gt:80; CHECK:       # %bb.0:81; CHECK-NEXT:    xorl %eax, %eax82; CHECK-NEXT:    retq83  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind84  %c = icmp sgt i32 %m, 085  ret i1 %c86}87 88define i1 @length4_le() nounwind {89; CHECK-LABEL: length4_le:90; CHECK:       # %bb.0:91; CHECK-NEXT:    movb $1, %al92; CHECK-NEXT:    retq93  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind94  %c = icmp sle i32 %m, 095  ret i1 %c96}97 98define i1 @length4_ge() nounwind {99; CHECK-LABEL: length4_ge:100; CHECK:       # %bb.0:101; CHECK-NEXT:    xorl %eax, %eax102; CHECK-NEXT:    retq103  %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind104  %c = icmp sge i32 %m, 0105  ret i1 %c106}107 108 109