Fixes crash reported here https://reviews.llvm.org/D73607
Using a store to keep the trunc intact. Returning v16i24 would
cause the trunc to be optimized away in SelectionDAGBuilder.
| Paths 
 |  Differential  D103940  
[X86] Check destination element type before forming VTRUNCS/VTRUNCUS in combineTruncateWithSat. ClosedPublic Authored by craig.topper on Jun 8 2021, 10:41 PM. 
Details Summary Fixes crash reported here https://reviews.llvm.org/D73607 Using a store to keep the trunc intact. Returning v16i24 would 
Diff Detail 
 Event TimelineThis revision is now accepted and ready to land.Jun 9 2021, 1:18 AM Closed by commit rG765ef4bb2af6: [X86] Check destination element type before forming VTRUNCS/VTRUNCUS in… (authored by craig.topper).  ·  Explain WhyJun 9 2021, 7:16 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
 
Diff 350890 llvm/lib/Target/X86/X86ISelLowering.cpp
 
 llvm/test/CodeGen/X86/vector-trunc-ssat.ll
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||