Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View pftbest's full-sized avatar

Vadzim Dambrouski pftbest

View GitHub Profile
; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "bugpoint-output-679c617.bc"
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv7m-none--eabi"
define void @"_ZN50_$LT$u32$u20$as$u20$core..num..bignum..FullOps$GT$12full_mul_add17h71cf046dadd25babE"({ i32, i32 }* noalias nocapture sret dereferenceable(8), i32, i32, i32, i32) unnamed_addr {
entry-block:
%5 = zext i32 %1 to i64
%6 = zext i32 %2 to i64
%7 = mul nuw i64 %6, %5
@pftbest
pftbest / bugpoint-reduced-simplified.ll
Created November 18, 2016 07:27
MSP430 Assertion
; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "bugpoint-output-70d0c91.bc"
target datalayout = "e-m:e-p:16:16-i32:16:32-a:16-n8:16"
target triple = "msp430"
define void @_ZN4core3num6bignum5tests6Big8x37div_rem17h4a91efdf5fc031b4E() unnamed_addr {
entry-block:
br i1 undef, label %bb2, label %bb3
bb2: ; preds = %entry-block
.p2align 2
.type _ZN4core3num14from_str_radix17h163fa34f02ec59b7E,@function
_ZN4core3num14from_str_radix17h163fa34f02ec59b7E: ; @_ZN4core3num14from_str_radix17h163fa34f02ec59b7E
; BB#0: ; %entry-block
push.w r11
push.w r10
push.w r9
push.w r8
push.w r7
push.w r6
user@archserv ~/trie-cpp $ make
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/main.cpp -o trie/main.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/stdafx.cpp -o trie/stdafx.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/tests.cpp -o trie/tests.o
clang++ -O1 -g -fno-omit-frame-pointer -fsanitize=address -Wall -std=c++14 -stdlib=libc++ -c trie/trie.cpp -o trie/trie.o
trie/trie.cpp:126:31: warning: comparison of constant 65535 with expression of type 'short' is always false
[-Wtautological-constant-out-of-range-compare]
if (trie_header->items_count == UINT16_MAX)
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
trie/trie.cpp:368:25: warning: array subscript is of type 'char' [-Wchar-subscripts]
user@archserv ~/trie-cpp $ ./a.out
trie/trie.cpp:141:2: runtime error: store to misaligned address 0x7ffd0d2362d1 for type 'short', which requires 2 byte alignment
0x7ffd0d2362d1: note: pointer points here
00 00 00 20 00 20 00 01 00 00 00 10 00 05 00 00 00 18 00 68 65 6c 6c 6f 00 00 00 01 00 00 00 00
^
trie/trie.cpp:145:42: runtime error: load of misaligned address 0x7ffd0d2362d1 for type 'short', which requires 2 byte alignment
0x7ffd0d2362d1: note: pointer points here
00 00 00 20 23 00 00 01 00 00 00 10 00 05 00 00 00 18 00 68 65 6c 6c 6f 00 00 00 01 00 00 00 00
^
trie/trie.cpp:146:31: runtime error: load of misaligned address 0x7ffd0d2362d1 for type 'short', which requires 2 byte alignment
#include <stdio.h>
int main() {
int left_edge, right_edge, top_edge, bottom_edge, max_iter, x_step, y_step,
y0, x0, x, y, i, x_x, y_y, temp, the_char, accum, count;
accum = 0;
count = 0;
while (count < 1545) {
left_edge = -420;
#[allow(unused_parens)]
fn main() {
let mut left_edge;
let mut right_edge;
let mut top_edge;
let mut bottom_edge;
let mut max_iter;
let mut x_step;
let mut y_step;
macbook:rust-lang vadzim$
macbook:rust-lang vadzim$ ./configure --enable-llvm-assertions --enable-llvm-release-debuginfo
configure: looking for configure programs
configure: found program 'cmp'
configure: found program 'mkdir'
configure: found program 'printf'
configure: found program 'cut'
configure: found program 'head'
configure: found program 'grep'
configure: found program 'xargs'
#![feature(test)]
extern crate test;
use test::Bencher;
use std::mem;
fn break_patterns1<T>(v: &mut [T]) {
let len = v.len();
if len >= 8 {
; Function Attrs: noinline norecurse nounwind readnone
define i32 @u32_ge_u32_or(i32, i32) unnamed_addr #1 {
start:
%2 = icmp ult i32 %0, %1
%3 = or i32 %1, %0
%_0.0 = select i1 %2, i32 0, i32 %3
ret i32 %_0.0
}
attributes #1 = { noinline norecurse nounwind readnone }