[llvm] 7e3183d - Add test triggered by review discussion on D97077
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 19 13:04:08 PST 2021
Author: Philip Reames
Date: 2021-02-19T13:03:58-08:00
New Revision: 7e3183d7352281b5d87668e66ad4d0870448a1a8
URL: https://github.com/llvm/llvm-project/commit/7e3183d7352281b5d87668e66ad4d0870448a1a8
DIFF: https://github.com/llvm/llvm-project/commit/7e3183d7352281b5d87668e66ad4d0870448a1a8.diff
LOG: Add test triggered by review discussion on D97077
Added:
Modified:
llvm/test/Analysis/ScalarEvolution/ranges.ll
Removed:
################################################################################
diff --git a/llvm/test/Analysis/ScalarEvolution/ranges.ll b/llvm/test/Analysis/ScalarEvolution/ranges.ll
index 1152e1a1f19e..dbdc90fa6ada 100644
--- a/llvm/test/Analysis/ScalarEvolution/ranges.ll
+++ b/llvm/test/Analysis/ScalarEvolution/ranges.ll
@@ -21,6 +21,23 @@ define i32 @ashr(i32 %a) {
ret i32 %ashr
}
+; Highlight the fact that non-argument non-instructions are
+; also possible.
+ at G = external global i8
+define i64 @ashr_global() {
+; CHECK-LABEL: 'ashr_global'
+; CHECK-NEXT: Classifying expressions for: @ashr_global
+; CHECK-NEXT: %ashr = ashr i64 ptrtoint (i8* @G to i64), 63
+; CHECK-NEXT: --> %ashr U: [-1,1) S: [-1,1)
+; CHECK-NEXT: Determining loop execution counts for: @ashr_global
+;
+ %ashr = ashr i64 ptrtoint (i8* @G to i64), 63
+ %pos = icmp sge i8* @G, null
+ call void @llvm.assume(i1 %pos)
+ ret i64 %ashr
+}
+
+
define i32 @shl(i32 %a) {
; CHECK-LABEL: 'shl'
; CHECK-NEXT: Classifying expressions for: @shl
More information about the llvm-commits
mailing list