[llvm] 72ea6fb - [NewGVN][NFC] Add test for x + poison -> poison

Nuno Lopes via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 30 04:19:57 PST 2021


Author: Nuno Lopes
Date: 2021-12-30T12:08:07Z
New Revision: 72ea6fbc150a1546044ee4f246bd630d6aa67a43

URL: https://github.com/llvm/llvm-project/commit/72ea6fbc150a1546044ee4f246bd630d6aa67a43
DIFF: https://github.com/llvm/llvm-project/commit/72ea6fbc150a1546044ee4f246bd630d6aa67a43.diff

LOG: [NewGVN][NFC] Add test for x + poison -> poison

Added: 
    

Modified: 
    llvm/test/Transforms/NewGVN/basic.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/NewGVN/basic.ll b/llvm/test/Transforms/NewGVN/basic.ll
index 90193bdbcda11..789ca3cfe9bb3 100644
--- a/llvm/test/Transforms/NewGVN/basic.ll
+++ b/llvm/test/Transforms/NewGVN/basic.ll
@@ -33,3 +33,11 @@ define i64 @simplifyselect(i64 %x, i64 %y, i1 %c1, i1 %c2, i1 %zzz) {
   %r = add i64 %r1, %r2_eq2
   ret i64 %r
 }
+
+define i8 @simplify_add_poison(i8 %x) {
+; CHECK-LABEL: @simplify_add_poison(
+; CHECK-NEXT:    ret i8 poison
+;
+  %r = add i8 poison, %x
+  ret i8 %r
+}


        


More information about the llvm-commits mailing list