aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-diff/DifferenceEngine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-29 06:26:06 +0000
committerChris Lattner <sabre@nondot.org>2010-07-29 06:26:06 +0000
commitfe34c1d53e15a9717a313120e4df3b35a10c708e (patch)
tree4d79047bd888b64916d246afead9a866b97af30e /llvm/tools/llvm-diff/DifferenceEngine.cpp
parent9fa15c3608ee7e0277f61b296799a69a400a65ed (diff)
downloadllvm-fe34c1d53e15a9717a313120e4df3b35a10c708e.zip
llvm-fe34c1d53e15a9717a313120e4df3b35a10c708e.tar.gz
llvm-fe34c1d53e15a9717a313120e4df3b35a10c708e.tar.bz2
Kill off the 'coerce' ABI passing form. Now 'direct' and 'extend' always
have a "coerce to" type which often matches the default lowering of Clang type to LLVM IR type, but the coerce case can be handled by making them not be the same. This simplifies things and fixes issues where X86-64 abi lowering would return coerce after making preferred types exactly match up. This caused us to compile: typedef float v4f32 __attribute__((__vector_size__(16))); v4f32 foo(v4f32 X) { return X+X; } into this code at -O0: define <4 x float> @foo(<4 x float> %X.coerce) nounwind { entry: %retval = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2] %coerce = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2] %X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3] store <4 x float> %X.coerce, <4 x float>* %coerce %X = load <4 x float>* %coerce ; <<4 x float>> [#uses=1] store <4 x float> %X, <4 x float>* %X.addr %tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1] %tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1] %add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1] store <4 x float> %add, <4 x float>* %retval %0 = load <4 x float>* %retval ; <<4 x float>> [#uses=1] ret <4 x float> %0 } Now we get: define <4 x float> @foo(<4 x float> %X) nounwind { entry: %X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3] store <4 x float> %X, <4 x float>* %X.addr %tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1] %tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1] %add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1] ret <4 x float> %add } This implements rdar://8248065 llvm-svn: 109733
Diffstat (limited to 'llvm/tools/llvm-diff/DifferenceEngine.cpp')
0 files changed, 0 insertions, 0 deletions