So, from your post:
-the engine cranks (otherwise, no way to check compression)
-you have
-compression
-spark
-good fuel in the tank, fuel pressure, and delivery to injectors
It could be:
-the electrical part of the ignition switch
-the ECU has a bad ground (check the ground connection at the thermostat housing)
-the ECU has bad data (disconnect the battery for 30 minutes)
When you say "it just died," describe how.
-sputtering and losing power could mean the coil or ignitor