In SDAG, we don't expand libcalls with a nobuiltin attribute.
It's not clear if that's correct from the existing code comment:
"Don't do the check if marked as nobuiltin for some reason."
...adding a test here either way to show that there is currently
a different behavior implemented in the CGP-based expansion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304991
91177308-0d34-0410-b5e6-
96231b3b80d8
ret i32 %cond
}
+define i1 @length2_eq_nobuiltin_attr(i8* %X, i8* %Y) {
+; CHECK-LABEL: length2_eq_nobuiltin_attr:
+; CHECK: # BB#0:
+; CHECK-NEXT: lhz 3, 0(3)
+; CHECK-NEXT: lhz 4, 0(4)
+; CHECK-NEXT: li 5, 0
+; CHECK-NEXT: li 12, 1
+; CHECK-NEXT: cmpw 3, 4
+; CHECK-NEXT: isel 3, 12, 5, 2
+; CHECK-NEXT: blr
+ %m = tail call signext i32 @memcmp(i8* %X, i8* %Y, i64 2) nobuiltin
+ %c = icmp eq i32 %m, 0
+ ret i1 %c
+}
+