We can combine a floating-point extension cast with a conversion from integer if we know the earlier cast is exact. For example:
fpext (sitofp (fptosi half F to iN) to float) to double --> sitofp (fptosi half F to iN) to double
This is an optimization suggested in PR36617:
https://bugs.llvm.org/show_bug.cgi?id=36617#c19
I left the mismatched unsigned -> signed pattern out of this patch just in case there's some weird type combo that I'm not seeing. I can add that here if there's no concern.
This gives us another opportunity to test-drive Alive2 with FP ops:
http://volta.cs.utah.edu:8080/z/NfYne7