{"action":"created","issue":{"url":"https://api.github.com/repos/LunarG/LunarGLASS/issues/32","repository_url":"https://api.github.com/repos/LunarG/LunarGLASS","labels_url":"https://api.github.com/repos/LunarG/LunarGLASS/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/LunarG/LunarGLASS/issues/32/comments","events_url":"https://api.github.com/repos/LunarG/LunarGLASS/issues/32/events","html_url":"https://github.com/LunarG/LunarGLASS/issues/32","id":168823792,"number":32,"title":"Hexagon - Broken Module","user":{"login":"migi0027-cdk","id":7347572,"avatar_url":"https://avatars.githubusercontent.com/u/7347572?v=3","gravatar_id":"","url":"https://api.github.com/users/migi0027-cdk","html_url":"https://github.com/migi0027-cdk","followers_url":"https://api.github.com/users/migi0027-cdk/followers","following_url":"https://api.github.com/users/migi0027-cdk/following{/other_user}","gists_url":"https://api.github.com/users/migi0027-cdk/gists{/gist_id}","starred_url":"https://api.github.com/users/migi0027-cdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/migi0027-cdk/subscriptions","organizations_url":"https://api.github.com/users/migi0027-cdk/orgs","repos_url":"https://api.github.com/users/migi0027-cdk/repos","events_url":"https://api.github.com/users/migi0027-cdk/events{/privacy}","received_events_url":"https://api.github.com/users/migi0027-cdk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-02T08:07:06Z","updated_at":"2016-08-09T10:09:28Z","closed_at":null,"body":"During the optimization phase (TopToBottom.cpp : runLLVMOptimizations1) some Hexagon intrinsics are generated, which result in an assert:\r\n\r\n`Incorrect number of arguments passed to called function!\r\n%1 = call i32 @llvm.hexagon.A2.tfrih.v4f32.v4f32.v3f32.v3f32.v3f32.f32(<4 x float> undef, i32 15, <3 x float> %0, i32\r\n0, <3 x float> %0, i32 1, <3 x float> %0, i32 2, float 1.000000e+00, i32 0)\r\nStored value type does not match pointer operand type!\r\nstore i32 %1, <4 x float>* @_inreturn0, align 16\r\n<4 x float>Broken module found, compilation aborted!`\r\n\r\nThe `store i32 %1, <4 x float>* @_inreturn0, align 16` section is not my doing, I assume it's something the optimizer changed from this line in the dumped IR:\r\n`store <4 x float> %14, <4 x float>* @_inreturn0`\r\n\r\nThe error is triggered from this section (dumped ir):\r\n`%7 = load <3 x float>* %geptr`\r\n`%ptr = extractelement <3 x float> %7, i32 0`\r\n`%8 = insertelement <4 x float> undef, float %ptr, i32 0 `\r\n`%ptr4 = extractelement <3 x float> %7, i32 1`\r\n`%9 = insertelement <4 x float> %8, float %ptr4, i32 1`\r\n`%ptr5 = extractelement <3 x float> %7, i32 2`\r\n`%10 = insertelement <4 x float> %9, float %ptr5, i32 2`\r\n`%11 = insertelement <4 x float> %10, float 1.000000e+00, i32 3`\r\n`store <4 x float> %11, <4 x float>* %geptr2`\r\n\r\nHowever I see nothing directly illegal by doing the above, then again I'm new to the LLVM scene."},"comment":{"url":"https://api.github.com/repos/LunarG/LunarGLASS/issues/comments/238510772","html_url":"https://github.com/LunarG/LunarGLASS/issues/32#issuecomment-238510772","issue_url":"https://api.github.com/repos/LunarG/LunarGLASS/issues/32","id":238510772,"user":{"login":"migi0027-cdk","id":7347572,"avatar_url":"https://avatars.githubusercontent.com/u/7347572?v=3","gravatar_id":"","url":"https://api.github.com/users/migi0027-cdk","html_url":"https://github.com/migi0027-cdk","followers_url":"https://api.github.com/users/migi0027-cdk/followers","following_url":"https://api.github.com/users/migi0027-cdk/following{/other_user}","gists_url":"https://api.github.com/users/migi0027-cdk/gists{/gist_id}","starred_url":"https://api.github.com/users/migi0027-cdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/migi0027-cdk/subscriptions","organizations_url":"https://api.github.com/users/migi0027-cdk/orgs","repos_url":"https://api.github.com/users/migi0027-cdk/repos","events_url":"https://api.github.com/users/migi0027-cdk/events{/privacy}","received_events_url":"https://api.github.com/users/migi0027-cdk/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T10:09:28Z","updated_at":"2016-08-09T10:09:28Z","body":"The issue occurs when this line in the dumped ir is present:\r\n`%13 = insertelement <4 x float> %12, float 1.000000e+00, i32 3`\r\n\r\nWhen I loaded a float from a temporarily stored alloca instance as such no error occured:\r\n`%17 = load float* %b`\r\n`%18 = insertelement <4 x float> %16, float %17, i32 3`\r\n\r\nFor me it looks as if insertelement or any pass transforming it has an issue with a value as the scalar operand."}}
{"actor":{"display_login":"migi0027-cdk"}}