[llvm] IR: de-duplicate two CmpInst routines (NFC) (PR #116866)
    Ramkumar Ramachandra via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Nov 19 13:38:40 PST 2024
    
    
  
artagnon wrote:
j
> > I think it might make more sense to drop the methods on CmpInst instead? getSignedPredicate and getUnsignedPredicate only make sense for icmps, so I'd expect them to be on ICmpInst only. Or does that make usage awkward somehow?
> 
> I think we'd need extra downcasts in many places if we move them to ICmpInst. Besides, there are several functions that are specific to FCmpInst that are also in CmpInst, so I don't see the harm in having these here, and asserting appropriately.
I'm happy to report that the code changes were quite minimal.
https://github.com/llvm/llvm-project/pull/116866
    
    
More information about the llvm-commits
mailing list