[llvm] e2c2eb0 - [X86] Fix NSW/NUW typo in avg test (PR44973)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 11:22:50 PST 2020


Author: Simon Pilgrim
Date: 2020-02-20T19:22:37Z
New Revision: e2c2eb0a5509ed8e013c4e4d880de27e60641b9a

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

LOG: [X86] Fix NSW/NUW typo in avg test (PR44973)

The not_avg_v16i8_wide_constants test shouldn't assume NSW/NUW for the addition of -1 - copy + paste typo from other avg tests

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/avg.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/avg.ll b/llvm/test/CodeGen/X86/avg.ll
index 77d1a3b84ded..2375db0d4903 100644
--- a/llvm/test/CodeGen/X86/avg.ll
+++ b/llvm/test/CodeGen/X86/avg.ll
@@ -2915,8 +2915,8 @@ define void @not_avg_v16i8_wide_constants(<16 x i8>* %a, <16 x i8>* %b) nounwind
   %2 = load <16 x i8>, <16 x i8>* %b
   %3 = zext <16 x i8> %1 to <16 x i128>
   %4 = zext <16 x i8> %2 to <16 x i128>
-  %5 = add nuw nsw <16 x i128> %3, <i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1>
-  %6 = add nuw nsw <16 x i128> %5, %4
+  %5 = add <16 x i128> %3, <i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1, i128 -1>
+  %6 = add <16 x i128> %5, %4
   %7 = lshr <16 x i128> %6, <i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1, i128 1>
   %8 = trunc <16 x i128> %7 to <16 x i8>
   store <16 x i8> %8, <16 x i8>* undef, align 4


        


More information about the llvm-commits mailing list