si-optimize-exec-masking pass is generating saveexec_b32 ops based on isWave32() without checking if target generation > gfx10 targets.
This patch updates isWave32 method to check for gfx10 and above targets and whether subtarget has FeatureWavefrontSize32.
Test case is added to check if si-optimize-exec-masking pass generates S_ANDN2_SAVEEXEC_B32 or S_ANDN2_SAVEEXEC_B64 correctly.
The exec masking issue is not solved by this. The pass itself needs to check whether the 32-bit saveexec operations are legal (i.e. gfx10). It's not directly broken because of wave32