[LLVMdev] a packed constant cannot be referenced in the arithmetic instruction?
Tzu-Chien Chiu
tzuchien.chiu at gmail.com
Thu Apr 21 05:00:41 PDT 2005
%foo1 = constant <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>;
void %main() {
%x = mul <4 x float> %foo1, %foo1
ret void
}
llvm-as complained " Reference to an invalid definition: 'foo1' of
type '<4 x float>' ".
I searched all test script in llvm/test, and I found the only way to
use packed constant is:
%foo1 = uninitialized global <4 x float>;
void %main() {
store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4
x float>* %foo1
%l1 = load <4 x float>* %foo1
%x = mul <4 x float> %l1, %l1
ret void
}
(in "llvm/test/Feature/packed.ll")
Why?
More information about the llvm-dev
mailing list