[llvm] a59dc55 - [InstSimplify] Move assume icmp test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 14:38:25 PDT 2020
Author: Nikita Popov
Date: 2020-07-01T23:35:52+02:00
New Revision: a59dc55c2a11c1b125d1a356a90b0b2bf72b16fb
URL: https://github.com/llvm/llvm-project/commit/a59dc55c2a11c1b125d1a356a90b0b2bf72b16fb
DIFF: https://github.com/llvm/llvm-project/commit/a59dc55c2a11c1b125d1a356a90b0b2bf72b16fb.diff
LOG: [InstSimplify] Move assume icmp test (NFC)
Move this test from InstCombine into InstSimplify.
Added:
llvm/test/Transforms/InstSimplify/assume_icmp.ll
Modified:
Removed:
llvm/test/Transforms/InstCombine/assume_icmp.ll
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/assume_icmp.ll b/llvm/test/Transforms/InstSimplify/assume_icmp.ll
similarity index 96%
rename from llvm/test/Transforms/InstCombine/assume_icmp.ll
rename to llvm/test/Transforms/InstSimplify/assume_icmp.ll
index 5da256755223..844bb4d6443a 100644
--- a/llvm/test/Transforms/InstCombine/assume_icmp.ll
+++ b/llvm/test/Transforms/InstSimplify/assume_icmp.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -instsimplify -S | FileCheck %s
declare void @llvm.assume(i1)
declare void @use(i1)
@@ -100,8 +100,8 @@ define void @and(i32 %x, i32 %y, i32 %z) {
; CHECK-LABEL: @and(
; CHECK-NEXT: [[CMP1:%.*]] = icmp ugt i32 [[X:%.*]], [[Y:%.*]]
; CHECK-NEXT: [[CMP2:%.*]] = icmp ugt i32 [[Z:%.*]], [[Y]]
-; CHECK-NEXT: call void @llvm.assume(i1 [[CMP1]])
-; CHECK-NEXT: call void @llvm.assume(i1 [[CMP2]])
+; CHECK-NEXT: [[AND:%.*]] = and i1 [[CMP1]], [[CMP2]]
+; CHECK-NEXT: call void @llvm.assume(i1 [[AND]])
; CHECK-NEXT: [[CMP3:%.*]] = icmp ugt i32 [[X]], [[Y]]
; CHECK-NEXT: call void @use(i1 [[CMP3]])
; CHECK-NEXT: [[CMP4:%.*]] = icmp uge i32 [[X]], [[Y]]
More information about the llvm-commits
mailing list