Well, I disagree. Devilic (?new word?) genocide would be praised as good, but not Gnomish. Why? Because we see one as good (Gnome) and one as bad (Devil) because of preconceived ideas. But, if we just consider genocide by itself it is just a neutral concept. It can be good or bad, depending upon the motives of the groups or individuals involved.
So, yes the action of the NPC would have a bad outcome (innocent lives are lost), but would the NPC be Evil? IMO no. Misguided and probably stupid, but not evil.
Now we could ask lots of questions about how stupid you have to be to think something like that (all gnomes are evil), and if said NPC has actually convinced himself of something he "deep down" knows is not true, but all other things being equal he would not be evil.
Consider the case of someone who has been cursed to see all gnomes as if they were devils. He would go about killing every gnome he came across. A terrible/bad/evil outcome but his motives were pure (in a D&D world where all devils are EVIL).
I don't think anyone would be quick to say that such a person would be evil, but rather a tragic victim. Why? Because his motives were good at all times. The blame/guilt lies with the one who cursed him. Any other standard would hold people morally responsible for mistakes, based on the outcome. And that, I submit, is just silly.
Now society, on the other hand, must judge by a different standard, but that's a whole different can of worms.
Again all of this is MHO.