Skip to content

Commit

Permalink
[test][DSE] Precommit test for D123162
Browse files Browse the repository at this point in the history
  • Loading branch information
aeubanks committed Apr 6, 2022
1 parent 4b569d3 commit 1342b86
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions llvm/test/Transforms/DeadStoreElimination/assume.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes=dse -S < %s | FileCheck %s

@global = external constant i8

define void @f() {
; CHECK-LABEL: @f(
; CHECK-NEXT: [[TMP1:%.*]] = call noalias i8* @_Znwm(i64 32)
; CHECK-NEXT: [[TMP2:%.*]] = icmp ugt i8* [[TMP1]], @global
; CHECK-NEXT: call void @llvm.assume(i1 [[TMP2]])
; CHECK-NEXT: store i8 0, i8* [[TMP1]], align 1
; CHECK-NEXT: ret void
;
%tmp1 = call noalias i8* @_Znwm(i64 32)
%tmp2 = icmp ugt i8* %tmp1, @global
call void @llvm.assume(i1 %tmp2)
store i8 0, i8* %tmp1, align 1
ret void
}

declare i8* @_Znwm(i64)

declare void @llvm.assume(i1)

0 comments on commit 1342b86

Please sign in to comment.