[X86] Fix -Wstring-conversion in X86InstrInfo.cpp (NFC)
authorJie Fu <jiefu@tencent.com>
Thu, 27 Apr 2023 09:52:57 +0000 (17:52 +0800)
committerJie Fu <jiefu@tencent.com>
Thu, 27 Apr 2023 09:52:57 +0000 (17:52 +0800)
/Users/jiefu/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp:9794:12: error: implicit conversion turns string literal into bool: 'const char[25]' to 'bool' [-Werror,-Wstring-conversion]
    assert("It should not reach here");
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode13.1/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
                      ~ ^
1 error generated.

llvm/lib/Target/X86/X86InstrInfo.cpp

index c499410..aa823e6 100644 (file)
@@ -9791,7 +9791,7 @@ genAlternativeDpCodeSequence(MachineInstr &Root, const TargetInstrInfo &TII,
   unsigned MaddOpc = 0;
   switch (Opc) {
   default:
-    assert("It should not reach here");
+    assert(false && "It should not reach here");
     break;
   // vpdpwssd xmm2,xmm3,xmm1
   // -->