We were generating different code to SelectionDAG, trying to extend to s8 first as per ABI instead of honoring the IR signext attribute first.
More discussion at https://github.com/llvm/llvm-project/issues/57181
| Paths 
 |  Differential  D133327  
[AArch64][GlobalISel] When lowering signext i1 parameters, don't zero-extend to s8 first. ClosedPublic Authored by aemerson on Sep 5 2022, 2:05 PM. 
Details Summary We were generating different code to SelectionDAG, trying to extend to s8 first as per ABI instead of honoring the IR signext attribute first. More discussion at https://github.com/llvm/llvm-project/issues/57181 
Diff Detail 
 
Unit TestsFailed 
 Event TimelineComment Actions 
 Sure, that also needed fixing. Comment Actions You said We were generating different code to SelectionDAG, Is there a test file that shows the generated code of SelectionDAG and GlobalIsel? Comment Actions 
 I added run lines to bool-ext-inc.ll and the tests that were used to generate the MIR tests too. Comment Actions 
 Thanks! The SelectionDAG code seems to be shorter (#instructions). Comment Actions 
 Yes, code quality there needs work still. Comment Actions I'd forgotten this hasn't landed yet. Given the comments were just about tests, I'll commit this now. Feel free to respond with any further issues and I'll address them post-commit. This revision is now accepted and ready to land.Oct 15 2022, 8:26 PM 
Revision Contents 
 
Diff 458666 llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
 llvm/test/CodeGen/AArch64/GlobalISel/call-lowering-signext.ll
 llvm/test/CodeGen/AArch64/GlobalISel/call-lowering-zeroext.ll
 llvm/test/CodeGen/AArch64/bool-ext-inc.ll
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
should we just pull CurArgInfo.Flags[0] out into a variable?