MaskRay updated this revision to Diff 557659. MaskRay added a comment. test rebase
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152279/new/ https://reviews.llvm.org/D152279 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/RISCV/riscv-sdata-module-flag.c Index: clang/test/CodeGen/RISCV/riscv-sdata-module-flag.c =================================================================== --- clang/test/CodeGen/RISCV/riscv-sdata-module-flag.c +++ clang/test/CodeGen/RISCV/riscv-sdata-module-flag.c @@ -32,14 +32,14 @@ void test(void) {} -// RV32-DEFAULT: !{i32 8, !"SmallDataLimit", i32 8} +// RV32-DEFAULT: !{i32 8, !"SmallDataLimit", i32 0} // RV32-G4: !{i32 8, !"SmallDataLimit", i32 4} // RV32-S0: !{i32 8, !"SmallDataLimit", i32 0} // RV32-S2G4: !{i32 8, !"SmallDataLimit", i32 4} // RV32-T16: !{i32 8, !"SmallDataLimit", i32 16} // RV32-PIC: !{i32 8, !"SmallDataLimit", i32 0} -// RV64-DEFAULT: !{i32 8, !"SmallDataLimit", i32 8} +// RV64-DEFAULT: !{i32 8, !"SmallDataLimit", i32 0} // RV64-G4: !{i32 8, !"SmallDataLimit", i32 4} // RV64-S0: !{i32 8, !"SmallDataLimit", i32 0} // RV64-S2G4: !{i32 8, !"SmallDataLimit", i32 4} Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -2107,12 +2107,11 @@ const Driver &D = TC.getDriver(); const llvm::Triple &Triple = TC.getTriple(); // Default small data limitation is eight. - const char *SmallDataLimit = "8"; + const char *SmallDataLimit = "0"; // Get small data limitation. if (Args.getLastArg(options::OPT_shared, options::OPT_fpic, options::OPT_fPIC)) { // Not support linker relaxation for PIC. - SmallDataLimit = "0"; if (Args.hasArg(options::OPT_G)) { D.Diag(diag::warn_drv_unsupported_sdata); } @@ -2120,7 +2119,6 @@ .equals_insensitive("large") && (Triple.getArch() == llvm::Triple::riscv64)) { // Not support linker relaxation for RV64 with large code model. - SmallDataLimit = "0"; if (Args.hasArg(options::OPT_G)) { D.Diag(diag::warn_drv_unsupported_sdata); }
Index: clang/test/CodeGen/RISCV/riscv-sdata-module-flag.c =================================================================== --- clang/test/CodeGen/RISCV/riscv-sdata-module-flag.c +++ clang/test/CodeGen/RISCV/riscv-sdata-module-flag.c @@ -32,14 +32,14 @@ void test(void) {} -// RV32-DEFAULT: !{i32 8, !"SmallDataLimit", i32 8} +// RV32-DEFAULT: !{i32 8, !"SmallDataLimit", i32 0} // RV32-G4: !{i32 8, !"SmallDataLimit", i32 4} // RV32-S0: !{i32 8, !"SmallDataLimit", i32 0} // RV32-S2G4: !{i32 8, !"SmallDataLimit", i32 4} // RV32-T16: !{i32 8, !"SmallDataLimit", i32 16} // RV32-PIC: !{i32 8, !"SmallDataLimit", i32 0} -// RV64-DEFAULT: !{i32 8, !"SmallDataLimit", i32 8} +// RV64-DEFAULT: !{i32 8, !"SmallDataLimit", i32 0} // RV64-G4: !{i32 8, !"SmallDataLimit", i32 4} // RV64-S0: !{i32 8, !"SmallDataLimit", i32 0} // RV64-S2G4: !{i32 8, !"SmallDataLimit", i32 4} Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -2107,12 +2107,11 @@ const Driver &D = TC.getDriver(); const llvm::Triple &Triple = TC.getTriple(); // Default small data limitation is eight. - const char *SmallDataLimit = "8"; + const char *SmallDataLimit = "0"; // Get small data limitation. if (Args.getLastArg(options::OPT_shared, options::OPT_fpic, options::OPT_fPIC)) { // Not support linker relaxation for PIC. - SmallDataLimit = "0"; if (Args.hasArg(options::OPT_G)) { D.Diag(diag::warn_drv_unsupported_sdata); } @@ -2120,7 +2119,6 @@ .equals_insensitive("large") && (Triple.getArch() == llvm::Triple::riscv64)) { // Not support linker relaxation for RV64 with large code model. - SmallDataLimit = "0"; if (Args.hasArg(options::OPT_G)) { D.Diag(diag::warn_drv_unsupported_sdata); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits