The molten salt reactor (MSR) specific 3D spatial dynamics code leveraging the neutronics and thermal-hydraulics (TH) coupling method, TMSR3D, has been extended for static and transient analysis of large advanced light water reactors (LWRs), particularly focusing on control rod ejection accidents. The code is built upon the neutron diffusion model leveraging the widely used "two-step" strategy in three-dimensional Cartesian coordinates. A polynomial nodal expansion method (NEM) is utilized to handle spatial variables, while the neutron kinetics solver employs the exponential transformation technique. The code also integrates a single-channel TH module and a steam table set at 15.5 Mpa. The accuracy of the code has been validated through three transient benchmarks, including the 3D-LRA benchmark for boiling water reactors (BWRs), the NEACRP 3D benchmark, and the MOX/UO2 core benchmark for pressurized water reactors (PWRs). These benchmarks cover both static and transient behaviors, and the results have been thoroughly analyzed. The close alignment of extended version of TMSR3D outcomes with reference data and other codes supports its reliability, making it a promising tool for future dynamic analyses of large-scale advanced PWRs.