[llvm] r370222 - [NFC] Added more tests for D66651
David Bolvansky via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 09:00:16 PDT 2019
Author: xbolva00
Date: Wed Aug 28 09:00:15 2019
New Revision: 370222
URL: http://llvm.org/viewvc/llvm-project?rev=370222&view=rev
Log:
[NFC] Added more tests for D66651
Modified:
llvm/trunk/test/Transforms/InstCombine/deref-alloc-fns.ll
Modified: llvm/trunk/test/Transforms/InstCombine/deref-alloc-fns.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/deref-alloc-fns.ll?rev=370222&r1=370221&r2=370222&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/deref-alloc-fns.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/deref-alloc-fns.ll Wed Aug 28 09:00:15 2019
@@ -134,6 +134,24 @@ define noalias i8* @calloc_constant_zero
ret i8* %call
}
+define noalias i8* @calloc_constant_zero_size4(i64 %n) {
+; CHECK-LABEL: @calloc_constant_zero_size4(
+; CHECK-NEXT: [[CALL:%.*]] = tail call noalias i8* @calloc(i64 0, i64 1)
+; CHECK-NEXT: ret i8* [[CALL]]
+;
+ %call = tail call noalias i8* @calloc(i64 0, i64 1)
+ ret i8* %call
+}
+
+define noalias i8* @calloc_constant_zero_size5(i64 %n) {
+; CHECK-LABEL: @calloc_constant_zero_size5(
+; CHECK-NEXT: [[CALL:%.*]] = tail call noalias i8* @calloc(i64 1, i64 0)
+; CHECK-NEXT: ret i8* [[CALL]]
+;
+ %call = tail call noalias i8* @calloc(i64 1, i64 0)
+ ret i8* %call
+}
+
define noalias i8* @calloc_constant_size() {
; CHECK-LABEL: @calloc_constant_size(
; CHECK-NEXT: [[CALL:%.*]] = tail call noalias dereferenceable_or_null(128) i8* @calloc(i64 16, i64 8)
More information about the llvm-commits
mailing list