[clang] 411ceac - [Clang] Fix tautological assertion in `Sema::CheckX86BuiltinTileDuplicate`

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 13 00:20:53 PDT 2023


Author: Yingwei Zheng
Date: 2023-10-13T15:19:35+08:00
New Revision: 411ceacf4351bd3af9db75b859063864b19e71e1

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

LOG: [Clang] Fix tautological assertion in `Sema::CheckX86BuiltinTileDuplicate`

Closes #68958.

Added: 
    

Modified: 
    clang/lib/Sema/SemaChecking.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 1b2f8cf296d16b6..cd61459cfbb13d6 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -6047,7 +6047,7 @@ bool Sema::CheckX86BuiltinTileDuplicate(CallExpr *TheCall,
     if (SemaBuiltinConstantArg(TheCall, ArgNum, Result))
       return true;
     int ArgExtValue = Result.getExtValue();
-    assert((ArgExtValue >= TileRegLow || ArgExtValue <= TileRegHigh) &&
+    assert((ArgExtValue >= TileRegLow && ArgExtValue <= TileRegHigh) &&
            "Incorrect tile register num.");
     if (ArgValues.test(ArgExtValue))
       return Diag(TheCall->getBeginLoc(),


        


More information about the cfe-commits mailing list