In theory the road bike should slaughter the mountain bike.
The more nuanced view really comes down to your legs and subtle gearing. If whatever hills you are doing can cope with around 30 to 35 gear inches then the road bike will be a lot better. If you can't cope with that gearing and your knees and legs are screaming on mid 20s gear inches and you have to get to 20" or below then the MTB will be better. There are always a few ultrasteep hills where the vast majority of cyclists would struggle on a compact. There aren't many people who would need 20" for everyday, but for all I know you might be one of them. One of the people I cycle with had to get ultra-low gearing. It was very difficult for him to decide whether to get a hybrid with MTB gearing or a compact race bike. He went for the former. That's also not the long term view, if the gearing is too high for you, you may improve and get used to it in a year or two.
My tips would be to really note down what gears you use, work out the gear inches and then compare to the lowest gears on a compact bike. I got a single speed recently and I found that even on the 20% on the hill on the way home I can just about cope with a 69" gear. The bike is so damn light that it's not quite as hard as it sounds. Not that I'm recomending that.