[PATCH] D76055: [SystemZ]  Improve foldMemoryOperandImpl().
    Ulrich Weigand via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Mar 12 05:54:02 PDT 2020
    
    
  
uweigand added a comment.
Ah, that's a good idea.  I agree this makes sense.
I'm wondering if there are other memory-and-immediate instructions that could be handled like that.   Looking at the list, I see:
- logical compares (CLFHSI, CLGHSI) -- those should be trivial to add
- addition (ASI, AGSI, potentially also ALSI, ALGSI) -- it should be possible to add them, I think (it may be a bit different since it would replace a read-modify-write)
Then there are a number of instructions that operate on a byte or halfword level in memory:
- MVI, MVHHI,
- CLI, CHHSI, CLHHSI
- NI, OI, XI
I'm not sure if there is an option to exploit those, given that LLVM will never spill 8- or 16-bit values.  But maybe there could be some opportunities in special cases?  E.g. an OILL with a small constant could be replaced by an OI targeting just the low byte of the in-memory value.
Maybe this would be something to think about for future extensions.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76055/new/
https://reviews.llvm.org/D76055
    
    
More information about the llvm-commits
mailing list