[llvm-branch-commits] [llvm] 112e3d8 - Add a pre-commit test for D124426

Juneyoung Lee via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Apr 30 04:51:48 PDT 2022


Author: Juneyoung Lee
Date: 2022-04-30T20:41:28+09:00
New Revision: 112e3d86870d214bfa27ce18bfa99eb8197e2bc7

URL: https://github.com/llvm/llvm-project/commit/112e3d86870d214bfa27ce18bfa99eb8197e2bc7
DIFF: https://github.com/llvm/llvm-project/commit/112e3d86870d214bfa27ce18bfa99eb8197e2bc7.diff

LOG: Add a pre-commit test for D124426

Added: 
    llvm/test/Transforms/InstCombine/select-cmp.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstCombine/select-cmp.ll b/llvm/test/Transforms/InstCombine/select-cmp.ll
new file mode 100644
index 0000000000000..dd39a78a9029c
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/select-cmp.ll
@@ -0,0 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+
+define i1 @f(i1 %cond, i32 %x, i32 %x2) {
+; CHECK-LABEL: @f(
+; CHECK-NEXT:    [[Y:%.*]] = select i1 [[COND:%.*]], i32 poison, i32 [[X:%.*]]
+; CHECK-NEXT:    [[C:%.*]] = icmp eq i32 [[Y]], [[X2:%.*]]
+; CHECK-NEXT:    ret i1 [[C]]
+;
+  %y = select i1 %cond, i32 poison, i32 %x
+  %c = icmp eq i32 %y, %x2
+  ret i1 %c
+}


        


More information about the llvm-branch-commits mailing list