[llvm] 8e51bb2 - [ValueTracking] Add a noundef test for D86477; NFC
Juneyoung Lee via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 12:40:38 PDT 2020
Author: Juneyoung Lee
Date: 2020-08-26T04:40:21+09:00
New Revision: 8e51bb249bc2a71ecd13092bc0e1e246995feba6
URL: https://github.com/llvm/llvm-project/commit/8e51bb249bc2a71ecd13092bc0e1e246995feba6
DIFF: https://github.com/llvm/llvm-project/commit/8e51bb249bc2a71ecd13092bc0e1e246995feba6.diff
LOG: [ValueTracking] Add a noundef test for D86477; NFC
Added:
Modified:
llvm/test/Transforms/InstSimplify/freeze-noundef.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstSimplify/freeze-noundef.ll b/llvm/test/Transforms/InstSimplify/freeze-noundef.ll
index f2e897b507e3..a3cf11ef31c4 100644
--- a/llvm/test/Transforms/InstSimplify/freeze-noundef.ll
+++ b/llvm/test/Transforms/InstSimplify/freeze-noundef.ll
@@ -69,7 +69,6 @@ define {i8, i32} @aggr({i8, i32} noundef %x) {
ret {i8, i32} %y
}
-; TODO: should look into extract operations
define i32 @extract({i8, i32} noundef %x) {
; CHECK-LABEL: @extract(
; CHECK-NEXT: [[Y:%.*]] = extractvalue { i8, i32 } [[X:%.*]], 1
@@ -91,3 +90,18 @@ define i32 @extract2({i8, {i8, i32}} noundef %x) {
%w = freeze i32 %z
ret i32 %w
}
+
+declare void @use_i1(i1 noundef)
+
+define i1 @used_by_fncall(i1 %x) {
+; CHECK-LABEL: @used_by_fncall(
+; CHECK-NEXT: [[Y:%.*]] = add nsw i1 [[X:%.*]], true
+; CHECK-NEXT: call void @use_i1(i1 [[Y]])
+; CHECK-NEXT: [[F:%.*]] = freeze i1 [[Y]]
+; CHECK-NEXT: ret i1 [[F]]
+;
+ %y = add nsw i1 %x, 1
+ call void @use_i1(i1 %y)
+ %f = freeze i1 %y
+ ret i1 %f
+}
More information about the llvm-commits
mailing list