[PATCH] [AArch64] enable rematerialization of float 0 values

Tim Northover t.p.northover at gmail.com
Thu Mar 19 19:54:12 PDT 2015


> There is an exception for constant physical registers (MRI.isConstantPhysReg()) however which should cover wzr/xzr. So in this case all should be fine.

I got there too, but also looked into isConstantPhysReg itself and
couldn't convince myself that it really knew what made a register
constant (E.g. it looked like it might classify sp as constant because
it's reserved and has no defs before FrameLowering).

> I am indeed wondering if the flag is that usefull, the default logic appears to be reasonable safe to me. Except for the case of an instruction that takes unreasonably long to compute, I don't see why you would not set it on any instruction. Maybe I'll do some experiments of what happens when you switch the default for that flag to true...

I was also worried by isReallyTriviallyReMaterializable's comments
being written in terms of performance assessment rather than
correctness. Trouble is, this kind of thing is rather difficult to
test or even probe rigorously.

Cheers.

Tim.




More information about the llvm-commits mailing list