How about creating a nested route-map instead of having two route-maps ?
route-map ABorCD permit 10
match ip address [ACL for AorB]
set ip next-hop x.x.x.x
route-map ABorCD permit 20
match ip address [ACL for CorD]
set ip next-hop x.x.x.x
route-map ABorCD permit 30