foad added a comment. Looks reasonable to me, but doesn't instcombine pick this up at the IR level? Or don't the .ll test cases run instcombine? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109214/new/ https://reviews.llvm.org/D109214