For all-optical communication and information processing, it is necessary to develop all-optical logic gates based on photonic structures that can directly perform logic operations. All-optical logic gates have been demonstrated based on conventional waveguides and interferometry, as well as photonic crystal structures. Nonetheless, any defects in those structures will introduce high scattering loss, which compromises the fidelity and contrast ratio of the information process. Based on the spin-valley locking effect that can achieve defect-immune unidirectional transmission of topological edge states in valley photonic crystals (VPCs), we propose a high-performance all-optical logic OR gate based on a VPC structure. By tuning the working bandwidth of the two input channels, we prevent interference between the two channels to achieve a stable and high-fidelity output. The transmittance of both channels is higher than 0.8, and a high contrast ratio of 28.8 dB is achieved. Moreover, the chirality of the logic gate originated from the spin-valley locking effect allows using different circularly polarized light as inputs, representing "1" or "0", which is highly desired in quantum computing. The device's footprint is 18 × 12 μm2, allowing high-density on-chip integration. In addition, this design can be experimentally fabricated using current nanofabrication techniques and will have potential applications in optical communication, information processing, and quantum computing.