[llvm] 4d85859 - [test][LoopDeletion] Precommit test

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 12:42:52 PDT 2022


Author: Arthur Eubanks
Date: 2022-04-15T12:40:12-07:00
New Revision: 4d85859ff48d16fc0ca8199676f7417a2c6dfe43

URL: https://github.com/llvm/llvm-project/commit/4d85859ff48d16fc0ca8199676f7417a2c6dfe43
DIFF: https://github.com/llvm/llvm-project/commit/4d85859ff48d16fc0ca8199676f7417a2c6dfe43.diff

LOG: [test][LoopDeletion] Precommit test

Added: 
    llvm/test/Transforms/LoopDeletion/blockaddress.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/LoopDeletion/blockaddress.ll b/llvm/test/Transforms/LoopDeletion/blockaddress.ll
new file mode 100644
index 0000000000000..e943b3f390414
--- /dev/null
+++ b/llvm/test/Transforms/LoopDeletion/blockaddress.ll
@@ -0,0 +1,26 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
+; RUN: opt -passes=loop-deletion -S < %s | FileCheck %s
+
+ at ba = private constant ptr blockaddress(@f, %bb)
+
+declare void @g(ptr)
+
+;.
+; CHECK: @[[BA:[a-zA-Z0-9_$"\\.-]+]] = private constant ptr inttoptr (i32 1 to ptr)
+;.
+define void @f() {
+; CHECK-LABEL: @f(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    br label [[BB2:%.*]]
+; CHECK:       bb2:
+; CHECK-NEXT:    call void @g(ptr @ba)
+; CHECK-NEXT:    ret void
+;
+entry:
+  br label %bb
+bb:
+  br i1 true, label %bb2, label %bb
+bb2:
+  call void @g(ptr @ba)
+  ret void
+}


        


More information about the llvm-commits mailing list