commit | 2b4f2e542bc97c2e84582610d9e8677871f94459 | [log] [tgz] |
---|---|---|
author | Aditya Nandakumar <aditya_nandakumar@apple.com> | Thu Apr 18 02:19:29 2019 +0000 |
committer | Aditya Nandakumar <aditya_nandakumar@apple.com> | Thu Apr 18 02:19:29 2019 +0000 |
tree | e5f3b7d5cb558673f3391dc4797f9517302ecfad | |
parent | 8738b3dc1b15e4b26a98c01db6dd0dd8aa570335 [diff] |
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358637 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/GlobalISel/IRTranslator.cpp b/lib/CodeGen/GlobalISel/IRTranslator.cpp index d368be8..09091d3 100644 --- a/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -608,7 +608,7 @@ 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; }