[llvm] 73818f4 - [NFC][ScalarEvolution] Add tests with ptrtoint in constant context in loop
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 13:03:52 PDT 2020
Author: Roman Lebedev
Date: 2020-10-12T23:02:55+03:00
New Revision: 73818f450e3a90fc89eca143ee30777ed7e660e9
URL: https://github.com/llvm/llvm-project/commit/73818f450e3a90fc89eca143ee30777ed7e660e9
DIFF: https://github.com/llvm/llvm-project/commit/73818f450e3a90fc89eca143ee30777ed7e660e9.diff
LOG: [NFC][ScalarEvolution] Add tests with ptrtoint in constant context in loop
Reduced from the https://reviews.llvm.org/D88806#2325340
Added:
llvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll b/llvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
new file mode 100644
index 000000000000..8cfa041e7552
--- /dev/null
+++ b/llvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
@@ -0,0 +1,273 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
+; RUN: opt < %s --data-layout="e-m:e-p:64:64:64:64-n8:16:32:64" -S -analyze -enable-new-pm=0 -scalar-evolution | FileCheck --check-prefixes=ALL,X64,PTR64_IDX64 %s
+; RUN: opt < %s --data-layout="e-m:e-p:64:64:64:64-n8:16:32:64" -S -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck --check-prefixes=ALL,X64,PTR64_IDX64 %s
+; RUN: opt < %s --data-layout="e-m:e-p:64:64:64:32-n8:16:32:64" -S -analyze -enable-new-pm=0 -scalar-evolution | FileCheck --check-prefixes=ALL,X64,PTR64_IDX32 %s
+; RUN: opt < %s --data-layout="e-m:e-p:64:64:64:32-n8:16:32:64" -S -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck --check-prefixes=ALL,X64,PTR64_IDX32 %s
+; RUN: opt < %s --data-layout="e-m:e-p:32:32:32:32-n8:16:32" -S -analyze -enable-new-pm=0 -scalar-evolution | FileCheck --check-prefixes=ALL,X32,PTR32_IDX32 %s
+; RUN: opt < %s --data-layout="e-m:e-p:32:32:32:32-n8:16:32" -S -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck --check-prefixes=ALL,X32,PTR32_IDX32 %s
+; RUN: opt < %s --data-layout="e-m:e-p:32:32:32:64-n8:16:32:64" -S -analyze -enable-new-pm=0 -scalar-evolution | FileCheck --check-prefixes=ALL,X32,PTR32_IDX64 %s
+; RUN: opt < %s --data-layout="e-m:e-p:32:32:32:64-n8:16:32:64" -S -disable-output "-passes=print<scalar-evolution>" 2>&1 | FileCheck --check-prefixes=ALL,X32,PTR32_IDX64 %s
+
+ at global = external hidden global [0 x i8]
+
+define hidden i32* @i64(i8* %arg, i32* %arg10) {
+; PTR64_IDX64-LABEL: 'i64'
+; PTR64_IDX64-NEXT: Classifying expressions for: @i64
+; PTR64_IDX64-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR64_IDX64-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX64-NEXT: %tmp12 = getelementptr i8, i8* %arg, i64 ptrtoint ([0 x i8]* @global to i64)
+; PTR64_IDX64-NEXT: --> (ptrtoint ([0 x i8]* @global to i64) + %arg) U: full-set S: full-set Exits: (ptrtoint ([0 x i8]* @global to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX64-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR64_IDX64-NEXT: --> (ptrtoint ([0 x i8]* @global to i64) + %arg) U: full-set S: full-set Exits: (ptrtoint ([0 x i8]* @global to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX64-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR64_IDX64-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR64_IDX64-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR64_IDX64-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX64-NEXT: Determining loop execution counts for: @i64
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR64_IDX32-LABEL: 'i64'
+; PTR64_IDX32-NEXT: Classifying expressions for: @i64
+; PTR64_IDX32-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR64_IDX32-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX32-NEXT: %tmp12 = getelementptr i8, i8* %arg, i64 ptrtoint ([0 x i8]* @global to i64)
+; PTR64_IDX32-NEXT: --> ((trunc i64 ptrtoint ([0 x i8]* @global to i64) to i32) + %arg) U: full-set S: full-set Exits: ((trunc i64 ptrtoint ([0 x i8]* @global to i64) to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX32-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR64_IDX32-NEXT: --> ((trunc i64 ptrtoint ([0 x i8]* @global to i64) to i32) + %arg) U: full-set S: full-set Exits: ((trunc i64 ptrtoint ([0 x i8]* @global to i64) to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX32-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR64_IDX32-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR64_IDX32-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR64_IDX32-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX32-NEXT: Determining loop execution counts for: @i64
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR32_IDX32-LABEL: 'i64'
+; PTR32_IDX32-NEXT: Classifying expressions for: @i64
+; PTR32_IDX32-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR32_IDX32-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX32-NEXT: %tmp12 = getelementptr i8, i8* %arg, i64 ptrtoint ([0 x i8]* @global to i64)
+; PTR32_IDX32-NEXT: --> ((trunc i64 ptrtoint ([0 x i8]* @global to i64) to i32) + %arg) U: full-set S: full-set Exits: ((trunc i64 ptrtoint ([0 x i8]* @global to i64) to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX32-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR32_IDX32-NEXT: --> ((trunc i64 ptrtoint ([0 x i8]* @global to i64) to i32) + %arg) U: full-set S: full-set Exits: ((trunc i64 ptrtoint ([0 x i8]* @global to i64) to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX32-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR32_IDX32-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR32_IDX32-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR32_IDX32-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX32-NEXT: Determining loop execution counts for: @i64
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR32_IDX64-LABEL: 'i64'
+; PTR32_IDX64-NEXT: Classifying expressions for: @i64
+; PTR32_IDX64-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR32_IDX64-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX64-NEXT: %tmp12 = getelementptr i8, i8* %arg, i64 ptrtoint ([0 x i8]* @global to i64)
+; PTR32_IDX64-NEXT: --> (ptrtoint ([0 x i8]* @global to i64) + %arg) U: [0,8589934591) S: full-set Exits: (ptrtoint ([0 x i8]* @global to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX64-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR32_IDX64-NEXT: --> (ptrtoint ([0 x i8]* @global to i64) + %arg) U: [0,8589934591) S: full-set Exits: (ptrtoint ([0 x i8]* @global to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX64-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR32_IDX64-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR32_IDX64-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR32_IDX64-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX64-NEXT: Determining loop execution counts for: @i64
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+bb:
+ br label %bb11
+
+bb11: ; preds = %bb17, %bb
+ %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+ %tmp12 = getelementptr i8, i8* %arg, i64 ptrtoint ([0 x i8]* @global to i64)
+ %tmp13 = bitcast i8* %tmp12 to i32*
+ %tmp14 = load i32, i32* %tmp13, align 4
+ %tmp15 = icmp eq i32 %tmp14, 6
+ br i1 %tmp15, label %bb16, label %bb17
+
+bb16: ; preds = %bb11
+ ret i32* %arg10
+
+bb17: ; preds = %bb11
+ %tmp18 = add i32 %tmp, 2
+ br label %bb11
+}
+define hidden i32* @i64_to_i32(i8* %arg, i32* %arg10) {
+; PTR64_IDX64-LABEL: 'i64_to_i32'
+; PTR64_IDX64-NEXT: Classifying expressions for: @i64_to_i32
+; PTR64_IDX64-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR64_IDX64-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX64-NEXT: %tmp12 = getelementptr i8, i8* %arg, i32 ptrtoint ([0 x i8]* @global to i32)
+; PTR64_IDX64-NEXT: --> ((sext i32 ptrtoint ([0 x i8]* @global to i32) to i64) + %arg) U: full-set S: full-set Exits: ((sext i32 ptrtoint ([0 x i8]* @global to i32) to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX64-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR64_IDX64-NEXT: --> ((sext i32 ptrtoint ([0 x i8]* @global to i32) to i64) + %arg) U: full-set S: full-set Exits: ((sext i32 ptrtoint ([0 x i8]* @global to i32) to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX64-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR64_IDX64-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR64_IDX64-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR64_IDX64-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX64-NEXT: Determining loop execution counts for: @i64_to_i32
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR64_IDX32-LABEL: 'i64_to_i32'
+; PTR64_IDX32-NEXT: Classifying expressions for: @i64_to_i32
+; PTR64_IDX32-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR64_IDX32-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX32-NEXT: %tmp12 = getelementptr i8, i8* %arg, i32 ptrtoint ([0 x i8]* @global to i32)
+; PTR64_IDX32-NEXT: --> (ptrtoint ([0 x i8]* @global to i32) + %arg) U: full-set S: full-set Exits: (ptrtoint ([0 x i8]* @global to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX32-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR64_IDX32-NEXT: --> (ptrtoint ([0 x i8]* @global to i32) + %arg) U: full-set S: full-set Exits: (ptrtoint ([0 x i8]* @global to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX32-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR64_IDX32-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR64_IDX32-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR64_IDX32-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX32-NEXT: Determining loop execution counts for: @i64_to_i32
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR32_IDX32-LABEL: 'i64_to_i32'
+; PTR32_IDX32-NEXT: Classifying expressions for: @i64_to_i32
+; PTR32_IDX32-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR32_IDX32-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX32-NEXT: %tmp12 = getelementptr i8, i8* %arg, i32 ptrtoint ([0 x i8]* @global to i32)
+; PTR32_IDX32-NEXT: --> (ptrtoint ([0 x i8]* @global to i32) + %arg) U: full-set S: full-set Exits: (ptrtoint ([0 x i8]* @global to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX32-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR32_IDX32-NEXT: --> (ptrtoint ([0 x i8]* @global to i32) + %arg) U: full-set S: full-set Exits: (ptrtoint ([0 x i8]* @global to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX32-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR32_IDX32-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR32_IDX32-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR32_IDX32-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX32-NEXT: Determining loop execution counts for: @i64_to_i32
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR32_IDX64-LABEL: 'i64_to_i32'
+; PTR32_IDX64-NEXT: Classifying expressions for: @i64_to_i32
+; PTR32_IDX64-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR32_IDX64-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX64-NEXT: %tmp12 = getelementptr i8, i8* %arg, i32 ptrtoint ([0 x i8]* @global to i32)
+; PTR32_IDX64-NEXT: --> ((sext i32 ptrtoint ([0 x i8]* @global to i32) to i64) + %arg) U: [-2147483648,6442450943) S: full-set Exits: ((sext i32 ptrtoint ([0 x i8]* @global to i32) to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX64-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR32_IDX64-NEXT: --> ((sext i32 ptrtoint ([0 x i8]* @global to i32) to i64) + %arg) U: [-2147483648,6442450943) S: full-set Exits: ((sext i32 ptrtoint ([0 x i8]* @global to i32) to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX64-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR32_IDX64-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR32_IDX64-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR32_IDX64-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX64-NEXT: Determining loop execution counts for: @i64_to_i32
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+bb:
+ br label %bb11
+
+bb11: ; preds = %bb17, %bb
+ %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+ %tmp12 = getelementptr i8, i8* %arg, i32 ptrtoint ([0 x i8]* @global to i32)
+ %tmp13 = bitcast i8* %tmp12 to i32*
+ %tmp14 = load i32, i32* %tmp13, align 4
+ %tmp15 = icmp eq i32 %tmp14, 6
+ br i1 %tmp15, label %bb16, label %bb17
+
+bb16: ; preds = %bb11
+ ret i32* %arg10
+
+bb17: ; preds = %bb11
+ %tmp18 = add i32 %tmp, 2
+ br label %bb11
+}
+define hidden i32* @i64_to_i128(i8* %arg, i32* %arg10) {
+; PTR64_IDX64-LABEL: 'i64_to_i128'
+; PTR64_IDX64-NEXT: Classifying expressions for: @i64_to_i128
+; PTR64_IDX64-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR64_IDX64-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX64-NEXT: %tmp12 = getelementptr i8, i8* %arg, i128 ptrtoint ([0 x i8]* @global to i128)
+; PTR64_IDX64-NEXT: --> ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i64) + %arg) U: full-set S: full-set Exits: ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX64-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR64_IDX64-NEXT: --> ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i64) + %arg) U: full-set S: full-set Exits: ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX64-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR64_IDX64-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR64_IDX64-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR64_IDX64-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX64-NEXT: Determining loop execution counts for: @i64_to_i128
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR64_IDX64-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR64_IDX32-LABEL: 'i64_to_i128'
+; PTR64_IDX32-NEXT: Classifying expressions for: @i64_to_i128
+; PTR64_IDX32-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR64_IDX32-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX32-NEXT: %tmp12 = getelementptr i8, i8* %arg, i128 ptrtoint ([0 x i8]* @global to i128)
+; PTR64_IDX32-NEXT: --> ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i32) + %arg) U: full-set S: full-set Exits: ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX32-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR64_IDX32-NEXT: --> ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i32) + %arg) U: full-set S: full-set Exits: ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR64_IDX32-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR64_IDX32-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR64_IDX32-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR64_IDX32-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR64_IDX32-NEXT: Determining loop execution counts for: @i64_to_i128
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR64_IDX32-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR32_IDX32-LABEL: 'i64_to_i128'
+; PTR32_IDX32-NEXT: Classifying expressions for: @i64_to_i128
+; PTR32_IDX32-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR32_IDX32-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX32-NEXT: %tmp12 = getelementptr i8, i8* %arg, i128 ptrtoint ([0 x i8]* @global to i128)
+; PTR32_IDX32-NEXT: --> ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i32) + %arg) U: full-set S: full-set Exits: ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX32-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR32_IDX32-NEXT: --> ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i32) + %arg) U: full-set S: full-set Exits: ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i32) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX32-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR32_IDX32-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR32_IDX32-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR32_IDX32-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX32-NEXT: Determining loop execution counts for: @i64_to_i128
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR32_IDX32-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+; PTR32_IDX64-LABEL: 'i64_to_i128'
+; PTR32_IDX64-NEXT: Classifying expressions for: @i64_to_i128
+; PTR32_IDX64-NEXT: %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+; PTR32_IDX64-NEXT: --> {0,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX64-NEXT: %tmp12 = getelementptr i8, i8* %arg, i128 ptrtoint ([0 x i8]* @global to i128)
+; PTR32_IDX64-NEXT: --> ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i64) + %arg) U: [0,8589934591) S: full-set Exits: ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX64-NEXT: %tmp13 = bitcast i8* %tmp12 to i32*
+; PTR32_IDX64-NEXT: --> ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i64) + %arg) U: [0,8589934591) S: full-set Exits: ((trunc i128 ptrtoint ([0 x i8]* @global to i128) to i64) + %arg) LoopDispositions: { %bb11: Invariant }
+; PTR32_IDX64-NEXT: %tmp14 = load i32, i32* %tmp13, align 4
+; PTR32_IDX64-NEXT: --> %tmp14 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb11: Variant }
+; PTR32_IDX64-NEXT: %tmp18 = add i32 %tmp, 2
+; PTR32_IDX64-NEXT: --> {2,+,2}<%bb11> U: [0,-1) S: [-2147483648,2147483647) Exits: <<Unknown>> LoopDispositions: { %bb11: Computable }
+; PTR32_IDX64-NEXT: Determining loop execution counts for: @i64_to_i128
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable backedge-taken count.
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable max backedge-taken count.
+; PTR32_IDX64-NEXT: Loop %bb11: Unpredictable predicated backedge-taken count.
+;
+bb:
+ br label %bb11
+
+bb11: ; preds = %bb17, %bb
+ %tmp = phi i32 [ 0, %bb ], [ %tmp18, %bb17 ]
+ %tmp12 = getelementptr i8, i8* %arg, i128 ptrtoint ([0 x i8]* @global to i128)
+ %tmp13 = bitcast i8* %tmp12 to i32*
+ %tmp14 = load i32, i32* %tmp13, align 4
+ %tmp15 = icmp eq i32 %tmp14, 6
+ br i1 %tmp15, label %bb16, label %bb17
+
+bb16: ; preds = %bb11
+ ret i32* %arg10
+
+bb17: ; preds = %bb11
+ %tmp18 = add i32 %tmp, 2
+ br label %bb11
+}
More information about the llvm-commits
mailing list