[X86][XOP] Fix SUB constant folding for VPSHA/VPSHL shift lowering
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 20 Jul 2018 16:55:18 +0000 (16:55 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 20 Jul 2018 16:55:18 +0000 (16:55 +0000)
commit70fcd0f481ea6ab9467839595e47d740752ffb0b
tree537da1e8482fda36cc560dd665dda6a8b026173c
parent80c6f41581be2697e05bcb07d88170971cffb0c6
[X86][XOP] Fix SUB constant folding for VPSHA/VPSHL shift lowering

We can safely use getConstant here as we're still lowering, which allows constant folding to kick in and simplify the vector shift codegen.

Noticed while working on D49562.

llvm-svn: 337578
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/combine-sdiv.ll
llvm/test/CodeGen/X86/vector-shift-ashr-128.ll
llvm/test/CodeGen/X86/vector-shift-ashr-256.ll
llvm/test/CodeGen/X86/vector-shift-lshr-128.ll
llvm/test/CodeGen/X86/vector-shift-lshr-256.ll