{"action":"opened","issue":{"url":"https://api.github.com/repos/avr-llvm/llvm/issues/163","labels_url":"https://api.github.com/repos/avr-llvm/llvm/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/avr-llvm/llvm/issues/163/comments","events_url":"https://api.github.com/repos/avr-llvm/llvm/issues/163/events","html_url":"https://github.com/avr-llvm/llvm/issues/163","id":106623130,"number":163,"title":"32 bit shift instructions are using missing libgcc symbols","user":{"login":"seanmkauffman","id":11034033,"avatar_url":"https://avatars.githubusercontent.com/u/11034033?v=3","gravatar_id":"","url":"https://api.github.com/users/seanmkauffman","html_url":"https://github.com/seanmkauffman","followers_url":"https://api.github.com/users/seanmkauffman/followers","following_url":"https://api.github.com/users/seanmkauffman/following{/other_user}","gists_url":"https://api.github.com/users/seanmkauffman/gists{/gist_id}","starred_url":"https://api.github.com/users/seanmkauffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanmkauffman/subscriptions","organizations_url":"https://api.github.com/users/seanmkauffman/orgs","repos_url":"https://api.github.com/users/seanmkauffman/repos","events_url":"https://api.github.com/users/seanmkauffman/events{/privacy}","received_events_url":"https://api.github.com/users/seanmkauffman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-15T18:59:59Z","updated_at":"2015-09-15T18:59:59Z","closed_at":null,"body":"LSHR and SHL with i32 operands are producing calls to libgcc symbols which don't exist.  LSHR produces a call to `__lshrsi3` and SHL produces a call to `__ashlsi3`.\r\n\r\nThe following programs demonstrate the problem.\r\n\r\nLSHR:\r\n```\r\ndefine i32 @run(i32 %a, i32 %b) #0 {\r\n  %1 = lshr i32 %a, %b\r\n  ret i32 %1\r\n}\r\ndefine i32 @main() #1 {\r\n  %1 = call i32 @run(i32 31, i32 31)\r\n  ret i32 %1\r\n}\r\n```\r\n\r\nSHL:\r\n```\r\ndefine i32 @run(i32 %a, i32 %b) #0 {\r\n  %1 = shl nsw i32 %a, %b\r\n  ret i32 %1\r\n}\r\ndefine i32 @main() #1 {\r\n  %1 = call i32 @run(i32 31, i32 31)\r\n  ret i32 %1\r\n}\r\n```"}}