Skip to content

Commit

Permalink
[tests] Update Transforms/DeadStoreElim/multiblock-malloc-free.ll
Browse files Browse the repository at this point in the history
This change is generated by running update_test_checks.py. It serves to
make subsequent diffs easier to understand.
  • Loading branch information
nhaehnle committed May 21, 2021
1 parent 96b7606 commit 77b83d3
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -22,7 +22,7 @@ define void @test16(i32* noalias %P) {
; CHECK-NEXT: br label [[BB3]]
; CHECK: bb3:
; CHECK-NEXT: call void @free(i8* [[P2]])
; CHECK-NEXT: store i32 1, i32* [[P]]
; CHECK-NEXT: store i32 1, i32* [[P]], align 4
; CHECK-NEXT: ret void
;
%P2 = bitcast i32* %P to i8*
Expand Down Expand Up @@ -71,7 +71,7 @@ define void @test17_read_after_free(i32* noalias %P) {
; CHECK-NEXT: br label [[BB3]]
; CHECK: bb3:
; CHECK-NEXT: call void @free(i8* [[P2]])
; CHECK-NEXT: [[LV:%.*]] = load i8, i8* [[P2]]
; CHECK-NEXT: [[LV:%.*]] = load i8, i8* [[P2]], align 1
; CHECK-NEXT: ret void
;
%P2 = bitcast i32* %P to i8*
Expand Down Expand Up @@ -156,7 +156,7 @@ define i8* @test26() {
; CHECK-NEXT: br i1 true, label [[BB2:%.*]], label [[BB3:%.*]]
; CHECK: bb2:
; CHECK-NEXT: [[M:%.*]] = call noalias i8* @malloc(i64 10)
; CHECK-NEXT: store i8 1, i8* [[M]]
; CHECK-NEXT: store i8 1, i8* [[M]], align 1
; CHECK-NEXT: br label [[BB3]]
; CHECK: bb3:
; CHECK-NEXT: [[R:%.*]] = phi i8* [ null, [[BB1:%.*]] ], [ [[M]], [[BB2]] ]
Expand Down Expand Up @@ -210,7 +210,7 @@ define i8* @test28() {
; CHECK-NEXT: [[MC5:%.*]] = bitcast i8* [[MC4]] to i8*
; CHECK-NEXT: [[MC6:%.*]] = bitcast i8* [[MC5]] to i8*
; CHECK-NEXT: [[M0:%.*]] = bitcast i8* [[MC6]] to i8*
; CHECK-NEXT: store i8 2, i8* [[M]]
; CHECK-NEXT: store i8 2, i8* [[M]], align 1
; CHECK-NEXT: ret i8* [[M0]]
;
bb0:
Expand Down Expand Up @@ -239,7 +239,7 @@ declare %struct.NodePtrVecStruct* @NodePtrVec_new(i32)
define noalias %struct.SystemCallMapElementStruct* @SystemCallMapElement_new(i8* nocapture readonly %label, i32 %initialSize) {
; CHECK-LABEL: @SystemCallMapElement_new(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[CALL:%.*]] = tail call dereferenceable_or_null(24) i8* @malloc(i64 24) #6
; CHECK-NEXT: [[CALL:%.*]] = tail call dereferenceable_or_null(24) i8* @malloc(i64 24) #[[ATTR6:[0-9]+]]
; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to %struct.SystemCallMapElementStruct*
; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8* [[CALL]], null
; CHECK-NEXT: br i1 [[TOBOOL]], label [[CLEANUP:%.*]], label [[IF_THEN:%.*]]
Expand All @@ -256,7 +256,7 @@ define noalias %struct.SystemCallMapElementStruct* @SystemCallMapElement_new(i8*
; CHECK-NEXT: tail call void @free(i8* nonnull [[CALL]])
; CHECK-NEXT: br label [[CLEANUP]]
; CHECK: if.end:
; CHECK-NEXT: [[CALL6:%.*]] = tail call %struct.NodePtrVecStruct* @NodePtrVec_new(i32 [[INITIALSIZE:%.*]]) #4
; CHECK-NEXT: [[CALL6:%.*]] = tail call %struct.NodePtrVecStruct* @NodePtrVec_new(i32 [[INITIALSIZE:%.*]]) #[[ATTR4:[0-9]+]]
; CHECK-NEXT: [[NODES:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 16
; CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[NODES]] to %struct.NodePtrVecStruct**
; CHECK-NEXT: store %struct.NodePtrVecStruct* [[CALL6]], %struct.NodePtrVecStruct** [[TMP2]], align 8
Expand Down Expand Up @@ -311,15 +311,15 @@ cleanup: ; preds = %entry, %if.end, %if
define noalias %struct.BitfieldStruct* @Bitfield_new(i32 %bitsNeeded) {
; CHECK-LABEL: @Bitfield_new(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[CALL:%.*]] = tail call dereferenceable_or_null(16) i8* @malloc(i64 16) #6
; CHECK-NEXT: [[CALL:%.*]] = tail call dereferenceable_or_null(16) i8* @malloc(i64 16) #[[ATTR6]]
; CHECK-NEXT: [[TMP0:%.*]] = bitcast i8* [[CALL]] to %struct.BitfieldStruct*
; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i8* [[CALL]], null
; CHECK-NEXT: br i1 [[TOBOOL]], label [[CLEANUP:%.*]], label [[IF_END:%.*]]
; CHECK: if.end:
; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[BITSNEEDED:%.*]], 7
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[ADD]], 8
; CHECK-NEXT: [[CONV:%.*]] = sext i32 [[DIV]] to i64
; CHECK-NEXT: [[CALL1:%.*]] = tail call i8* @calloc(i64 [[CONV]], i64 1) #7
; CHECK-NEXT: [[CALL1:%.*]] = tail call i8* @calloc(i64 [[CONV]], i64 1) #[[ATTR7:[0-9]+]]
; CHECK-NEXT: [[BITFIELD:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 8
; CHECK-NEXT: [[TMP1:%.*]] = bitcast i8* [[BITFIELD]] to i8**
; CHECK-NEXT: store i8* [[CALL1]], i8** [[TMP1]], align 8
Expand Down

0 comments on commit 77b83d3

Please sign in to comment.