[llvm] 1d3e38b - [NewGVN] Add test for #53218 (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 04:54:13 PDT 2023


Author: Nikita Popov
Date: 2023-09-26T13:54:03+02:00
New Revision: 1d3e38bfb76338e8f6bb7dd7eb3b02b16dec03dd

URL: https://github.com/llvm/llvm-project/commit/1d3e38bfb76338e8f6bb7dd7eb3b02b16dec03dd
DIFF: https://github.com/llvm/llvm-project/commit/1d3e38bfb76338e8f6bb7dd7eb3b02b16dec03dd.diff

LOG: [NewGVN] Add test for #53218 (NFC)

Added: 
    

Modified: 
    llvm/test/Transforms/NewGVN/flags-simplify.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/NewGVN/flags-simplify.ll b/llvm/test/Transforms/NewGVN/flags-simplify.ll
index 408a5a948f94456..b6de00e4a8c1d3f 100644
--- a/llvm/test/Transforms/NewGVN/flags-simplify.ll
+++ b/llvm/test/Transforms/NewGVN/flags-simplify.ll
@@ -42,6 +42,21 @@ entry:                                          ; preds = %if.then
   ret i64 %conv7
 }
 
+define i64 @lshr_lsh_nuw(i64 %tmp) {
+; CHECK-LABEL: @lshr_lsh_nuw(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[CONV3:%.*]] = shl i64 [[TMP:%.*]], 32
+; CHECK-NEXT:    store i64 [[CONV3]], ptr @f, align 8
+; CHECK-NEXT:    ret i64 [[TMP]]
+;
+entry:
+  %conv3 = shl nuw i64 %tmp, 32
+  store i64 %conv3, i64* @f, align 8
+  %sext = shl i64 %tmp, 32
+  %lshr = lshr i64 %sext, 32
+  ret i64 %lshr
+}
+
 define i32 @udiv_exact_mul(i32 %x, i32 %y, i1 %arg2) {
 ; CHECK-LABEL: @udiv_exact_mul(
 ; CHECK-NEXT:    br i1 [[ARG2:%.*]], label [[BB2:%.*]], label [[BB1:%.*]]


        


More information about the llvm-commits mailing list