Skip to content

Instantly share code, notes, and snippets.

@arielb1
Created October 3, 2016 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arielb1/5f08b282fa5aa2c5041fca87a9ce94b1 to your computer and use it in GitHub Desktop.
Save arielb1/5f08b282fa5aa2c5041fca87a9ce94b1 to your computer and use it in GitHub Desktop.
bad instcombine
; ModuleID = 'test.cgu-0.rs'
source_filename = "test.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: readonly uwtable
define i32 @dot_ref_s(i32** noalias nocapture readonly dereferenceable(8)) {
entry-block:
%loadedptr = load i32*, i32** %0, align 8, !nonnull !0
%ptrtoint = ptrtoint i32* %loadedptr to i64
%inttoptr = inttoptr i64 %ptrtoint to i32*
%switchtmp = icmp eq i32* %inttoptr, null
br i1 %switchtmp, label %bb6, label %bb7
bb6:
ret i32 0
bb7:
ret i32 42
}
!0 = !{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment