summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-02 22:07:37 +0000
committerReid Kleckner <rnk@google.com>2017-05-02 22:07:37 +0000
commitee4930b6886d713778fff4de3948946c7658d9d9 (patch)
tree24f60ae0cadbe03c5b098d2c86bba5ebfd88636f /llvm/lib/CodeGen
parent65134057357725c245fcfeb4b588518ef6d6db20 (diff)
downloadbcm5719-llvm-ee4930b6886d713778fff4de3948946c7658d9d9.tar.gz
bcm5719-llvm-ee4930b6886d713778fff4de3948946c7658d9d9.zip
Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList"
This time, I fixed, built, and tested clang. This reverts r301712. llvm-svn: 301981
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/CallLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
index ebfe6cb3b73..47433eb126d 100644
--- a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
@@ -83,8 +83,8 @@ void CallLowering::setArgFlags(CallLowering::ArgInfo &Arg, unsigned OpIdx,
// For ByVal, alignment should be passed from FE. BE will guess if
// this info is not there but there are cases it cannot get right.
unsigned FrameAlign;
- if (FuncInfo.getParamAlignment(OpIdx - 1))
- FrameAlign = FuncInfo.getParamAlignment(OpIdx - 1);
+ if (FuncInfo.getParamAlignment(OpIdx - 2))
+ FrameAlign = FuncInfo.getParamAlignment(OpIdx - 2);
else
FrameAlign = getTLI()->getByValTypeAlignment(ElementTy, DL);
Arg.Flags.setByValAlign(FrameAlign);
OpenPOWER on IntegriCloud