diff options
| author | Aditya Nandakumar <aditya_nandakumar@apple.com> | 2019-04-18 02:19:29 +0000 |
|---|---|---|
| committer | Aditya Nandakumar <aditya_nandakumar@apple.com> | 2019-04-18 02:19:29 +0000 |
| commit | 92663376563d69d96399116050b2f7b2ffe9b8d0 (patch) | |
| tree | d899cc3edc022d889895dd98433355a5ffa9ce99 /llvm/lib | |
| parent | 7b6192025e8f183f0ea84ba9d59da7374727e8a6 (diff) | |
| download | bcm5719-llvm-92663376563d69d96399116050b2f7b2ffe9b8d0.tar.gz bcm5719-llvm-92663376563d69d96399116050b2f7b2ffe9b8d0.zip | |
[GISel]:IRTranslator: Prefer a buidInstr form that allows CSE of cast instructions
https://reviews.llvm.org/D60844
Use the style of buildInstr that allows CSEing.
llvm-svn: 358637
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index d368be89703..09091d3930e 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -608,7 +608,7 @@ bool IRTranslator::translateCast(unsigned Opcode, const User &U, MachineIRBuilder &MIRBuilder) { unsigned Op = getOrCreateVReg(*U.getOperand(0)); unsigned Res = getOrCreateVReg(U); - MIRBuilder.buildInstr(Opcode).addDef(Res).addUse(Op); + MIRBuilder.buildInstr(Opcode, {Res}, {Op}); return true; } |

