my ptx code with -O0 get unreasonable sass in CUDA 11.1, there is more mov than expected
source ptx below
.reg .f32 f1,f2,f3;
fma.rn.f32 f1, f1, f1, f1;
fma.rn.f32 f2, f2, f2, f2;
fma.rn.f32 f3, f3, f3, f3;
ret;
ptxas gen sass file like below
/*0008*/ MOV R1, c[0x0][0x20] ; /* 0x4c98078000870001 */
/*0010*/ FFMA R0, R0, R0, R0 ; /* 0x5980000000070000 */
/*0018*/ FFMA R2, R2, R2, R2 ; /* 0x5980010000270202 */
/* 0x007fbc03fde01fef */
/*0028*/ FFMA R3, R3, R3, R3 ; /* 0x5980018000370303 */
/*0030*/ MOV R0, R0 ; /* 0x5c98078000070000 */
/*0038*/ MOV R2, R2 ; /* 0x5c98078000270002 */
/* 0x001ffc03fde01fef */
/*0048*/ MOV R3, R3 ; /* 0x5c98078000370003 */
/*0050*/ EXIT ; /* 0xe30000000007000f */
I expexted sass like below
/*0008*/ MOV R1, c[0x0][0x20] ; /* 0x4c98078000870001 */
/*0010*/ FFMA R0, R0, R0, R0 ; /* 0x5980000000070000 */
/*0018*/ FFMA R2, R2, R2, R2 ; /* 0x5980010000270202 */
/* 0x007fbc03fde01fef */
/*0028*/ FFMA R3, R3, R3, R3 ; /* 0x5980018000370303 */
/*0030*/ EXIT ; /* 0xe30000000007000f */
PS: -O1 will remove all code, it is not what i want orz…