Skip to content

Instantly share code, notes, and snippets.

View fwinter's full-sized avatar

Frank Winter fwinter

  • Jefferson Lab
  • Newport News, VA
View GitHub Profile
@fwinter
fwinter / gvn_ok.ll
Created May 13, 2013 18:33
Simplified label %L3. GVN succeeds.
define void @main(i1 %arg0, i32 %arg1, i32 %arg2, i32 %arg3, i1 %arg4, i32 %arg5, i32* %arg6, i1* %arg7) {
entrypoint:
%0 = sext i1 %arg4 to i32
%1 = xor i32 -1, %0
%2 = icmp sge i32 %arg5, %arg1
br i1 %2, label %L0, label %L1
L0: ; preds = %entrypoint
ret void
@fwinter
fwinter / ll_eval.ll
Created May 6, 2013 13:19
This LLVM IR kernel crashes libNVVM 1.0 Stack dump: 0. Running pass 'Function Pass Manager' on module ''. 1. Running pass 'Simplify the CFG' on function '@function' Segmentation fault (core dumped)
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"
declare i32 @llvm.nvvm.read.ptx.sreg.ctaid.x() nounwind readnone
declare i32 @llvm.nvvm.read.ptx.sreg.ntid.x() nounwind readnone
declare i32 @llvm.nvvm.read.ptx.sreg.tid.x() nounwind readnone
define void @function (i1 %r0 ,
i32 %r1 ,
i32 %r2 ,
i32 %r3 ,