llvm.org GIT mirror llvm / d142ab1
Silence MSVC error C2398 Reported by http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/6000/steps/build-unified-tree/logs/stdio The error messages were all similar to: llvm\unittests\CodeGen\GlobalISel\LegalizerInfoTest.cpp(54): error C2398: Element '1': conversion from '' to 'unsigned int' requires a narrowing conversion git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317578 91177308-0d34-0410-b5e6-96231b3b80d8 Kristof Beyls 1 year, 9 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
4848 using namespace TargetOpcode;
4949 LegalizerInfo L;
5050 // Typical RISCy set of operations based on AArch64.
51 for (auto Op : {G_ADD, G_SUB}) {
51 for (unsigned Op : {G_ADD, G_SUB}) {
5252 for (unsigned Size : {32, 64})
5353 L.setAction({Op, 0, LLT::scalar(Size)}, LegalizerInfo::Legal);
5454 L.setLegalizeScalarToDifferentSizeStrategy(
5757
5858 L.computeTables();
5959
60 for (auto &opcode : {G_ADD, G_SUB}) {
60 for (unsigned opcode : {G_ADD, G_SUB}) {
6161 // Check we infer the correct types and actually do what we're told.
6262 ASSERT_EQ(L.getAction({opcode, LLT::scalar(8)}),
6363 std::make_pair(LegalizerInfo::WidenScalar, LLT::scalar(32)));